Debugging Jikes

View: New views
7 Messages — Rating Filter:   Alert me  

Debugging Jikes

by Colin(Du Li) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi, guys,

I'm a newbie for Jikes. I wanna get some advice to debug Jikes.
Now I'm using Jikes 3.1. I can import and edit Jikes source code in Eclipse. But can we launch, trace and debug Jikes in Eclipse?

We can use GDB to launch Jikes, but most of Jikes source codes are written in Java, can we debug these Java source codes ?

So what's the best way to trace and debug Jikes?
I do appreciate your suggestions.

Thanks a lot!

Colin

Re: [rvm-research] Debugging Jikes

by Michael Bond :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Colin,

(1) Jikes doesn't support a standard Java debugging interface that would
allow it to be used with Eclipse's debugger (I think the one it would need
to support is Java VM Debug Interface: JVMDI).  Byeongcheol Lee (CCed but
also on the mailing list) has implemented JVMDI support for Jikes, but
it's not part of the SVN trunk, and it supports only baseline-compiled
code.  He said he could send you his patch if you're interested.
However, I don't think it's what you want since it's it enables debugging
*applications* run by Jikes, rather than debugging Jikes itself.

(2) Maybe you've seen this page already:

http://jikesrvm.org/Debugging+the+RVM

The -gdb flag provides an easy way to run Jikes with gdb.  I believe one
important advantage of using the -gdb flag is that symbols get passed
through to gdb, so you get more information about stack traces in Java
code (?).

(3) Finally, Jikes has an interactive debugger that you can invoke by
sending SIQUIT to Jikes while it's running:

pkill -SIGQUIT JikesRVM

In previous versions of Jikes, that stopped all threads and provided an
interactive prompt, but currently it just dumps the state of the VM and
continues immediately (that's a known issue:
http://jira.codehaus.org/browse/RVM-570).

Also, it appears that a baseline-only version of Jikes, i.e., prototype,
doesn't currently support the debugger.  It looks like that's because the
TimerThread, which launches the debugger (among other things), doesn't run
if the adaptive system isn't enabled.  I'll open a JIRA on that.  In the
meantime I'd suggest using a configuration that includes the adaptive
system (AOS), e.g., prototype-opt or development or production.

Cheers,
Mike



On Thu, 13 Aug 2009, Colin(Du Li) wrote:

>
> Hi, guys,
>
> I'm a newbie for Jikes. I wanna get some advice to debug Jikes.
> Now I'm using Jikes 3.1. I can import and edit Jikes source code in Eclipse.
> But can we launch, trace and debug Jikes in Eclipse?
>
> We can use GDB to launch Jikes, but most of Jikes source codes are written
> in Java, can we debug these Java source codes ?
>
> So what's the best way to trace and debug Jikes?
> I do appreciate your suggestions.
>
> Thanks a lot!
>
> Colin
> --
> View this message in context: http://www.nabble.com/Debugging-Jikes-tp24955377p24955377.html
> Sent from the jikesrvm-researchers mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Jikesrvm-researchers mailing list
> Jikesrvm-researchers@...
> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers

Re: [rvm-research] Debugging Jikes

by Filip Pizlo-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

No reason why the TimerThread shouldn't always be started.  That  
simple change seems to work.

Anyone have objections?

-Filip



On Aug 21, 2009, at 18:49 , Michael Bond wrote:

> Hi Colin,
>
> (1) Jikes doesn't support a standard Java debugging interface that  
> would
> allow it to be used with Eclipse's debugger (I think the one it  
> would need
> to support is Java VM Debug Interface: JVMDI).  Byeongcheol Lee  
> (CCed but
> also on the mailing list) has implemented JVMDI support for Jikes, but
> it's not part of the SVN trunk, and it supports only baseline-compiled
> code.  He said he could send you his patch if you're interested.
> However, I don't think it's what you want since it's it enables  
> debugging
> *applications* run by Jikes, rather than debugging Jikes itself.
>
> (2) Maybe you've seen this page already:
>
> http://jikesrvm.org/Debugging+the+RVM
>
> The -gdb flag provides an easy way to run Jikes with gdb.  I believe  
> one
> important advantage of using the -gdb flag is that symbols get passed
> through to gdb, so you get more information about stack traces in Java
> code (?).
>
> (3) Finally, Jikes has an interactive debugger that you can invoke by
> sending SIQUIT to Jikes while it's running:
>
> pkill -SIGQUIT JikesRVM
>
> In previous versions of Jikes, that stopped all threads and provided  
> an
> interactive prompt, but currently it just dumps the state of the VM  
> and
> continues immediately (that's a known issue:
> http://jira.codehaus.org/browse/RVM-570).
>
> Also, it appears that a baseline-only version of Jikes, i.e.,  
> prototype,
> doesn't currently support the debugger.  It looks like that's  
> because the
> TimerThread, which launches the debugger (among other things),  
> doesn't run
> if the adaptive system isn't enabled.  I'll open a JIRA on that.  In  
> the
> meantime I'd suggest using a configuration that includes the adaptive
> system (AOS), e.g., prototype-opt or development or production.
>
> Cheers,
> Mike
>
>
>
> On Thu, 13 Aug 2009, Colin(Du Li) wrote:
>
>>
>> Hi, guys,
>>
>> I'm a newbie for Jikes. I wanna get some advice to debug Jikes.
>> Now I'm using Jikes 3.1. I can import and edit Jikes source code in  
>> Eclipse.
>> But can we launch, trace and debug Jikes in Eclipse?
>>
>> We can use GDB to launch Jikes, but most of Jikes source codes are  
>> written
>> in Java, can we debug these Java source codes ?
>>
>> So what's the best way to trace and debug Jikes?
>> I do appreciate your suggestions.
>>
>> Thanks a lot!
>>
>> Colin
>> --
>> View this message in context: http://www.nabble.com/Debugging-Jikes-tp24955377p24955377.html
>> Sent from the jikesrvm-researchers mailing list archive at  
>> Nabble.com.
>>
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports  
>> 2008 30-Day
>> trial. Simplify your report design, integration and deployment -  
>> and focus on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> Jikesrvm-researchers mailing list
>> Jikesrvm-researchers@...
>> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
>>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008  
> 30-Day
> trial. Simplify your report design, integration and deployment - and  
> focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Jikesrvm-researchers mailing list
> Jikesrvm-researchers@...
> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers

Re: [rvm-research] Debugging Jikes

by Colin(Du Li) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks you so much for your detailed reply. It's really helpful.
I wonder if a Eclipse plugin to enable debugging rvm in eclipse will be very useful.

Du Li

Michael Bond wrote:
Hi Colin,

(1) Jikes doesn't support a standard Java debugging interface that would
allow it to be used with Eclipse's debugger (I think the one it would need
to support is Java VM Debug Interface: JVMDI).  Byeongcheol Lee (CCed but
also on the mailing list) has implemented JVMDI support for Jikes, but
it's not part of the SVN trunk, and it supports only baseline-compiled
code.  He said he could send you his patch if you're interested.
However, I don't think it's what you want since it's it enables debugging
*applications* run by Jikes, rather than debugging Jikes itself.

(2) Maybe you've seen this page already:

http://jikesrvm.org/Debugging+the+RVM

The -gdb flag provides an easy way to run Jikes with gdb.  I believe one
important advantage of using the -gdb flag is that symbols get passed
through to gdb, so you get more information about stack traces in Java
code (?).

(3) Finally, Jikes has an interactive debugger that you can invoke by
sending SIQUIT to Jikes while it's running:

pkill -SIGQUIT JikesRVM

In previous versions of Jikes, that stopped all threads and provided an
interactive prompt, but currently it just dumps the state of the VM and
continues immediately (that's a known issue:
http://jira.codehaus.org/browse/RVM-570).

Also, it appears that a baseline-only version of Jikes, i.e., prototype,
doesn't currently support the debugger.  It looks like that's because the
TimerThread, which launches the debugger (among other things), doesn't run
if the adaptive system isn't enabled.  I'll open a JIRA on that.  In the
meantime I'd suggest using a configuration that includes the adaptive
system (AOS), e.g., prototype-opt or development or production.

Cheers,
Mike



On Thu, 13 Aug 2009, Colin(Du Li) wrote:

>
> Hi, guys,
>
> I'm a newbie for Jikes. I wanna get some advice to debug Jikes.
> Now I'm using Jikes 3.1. I can import and edit Jikes source code in Eclipse.
> But can we launch, trace and debug Jikes in Eclipse?
>
> We can use GDB to launch Jikes, but most of Jikes source codes are written
> in Java, can we debug these Java source codes ?
>
> So what's the best way to trace and debug Jikes?
> I do appreciate your suggestions.
>
> Thanks a lot!
>
> Colin
> --
> View this message in context: http://www.nabble.com/Debugging-Jikes-tp24955377p24955377.html
> Sent from the jikesrvm-researchers mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Jikesrvm-researchers mailing list
> Jikesrvm-researchers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers

Re: [rvm-research] Debugging Jikes

by Michael Bond :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sounds good.  It seems like the TimerThread shouldn't trigger yieldpoints
if the adaptive system isn't enabled (i.e., it should only trigger the
debugger thread)?  Here's a new issue if anyone has comments:

http://jira.codehaus.org/browse/RVM-850

Mike

On Fri, 21 Aug 2009, Filip Pizlo wrote:

> No reason why the TimerThread shouldn't always be started.  That
> simple change seems to work.
>
> Anyone have objections?
>
> -Filip
>
>
>
> On Aug 21, 2009, at 18:49 , Michael Bond wrote:
>
>> Hi Colin,
>>
>> (1) Jikes doesn't support a standard Java debugging interface that
>> would
>> allow it to be used with Eclipse's debugger (I think the one it
>> would need
>> to support is Java VM Debug Interface: JVMDI).  Byeongcheol Lee
>> (CCed but
>> also on the mailing list) has implemented JVMDI support for Jikes, but
>> it's not part of the SVN trunk, and it supports only baseline-compiled
>> code.  He said he could send you his patch if you're interested.
>> However, I don't think it's what you want since it's it enables
>> debugging
>> *applications* run by Jikes, rather than debugging Jikes itself.
>>
>> (2) Maybe you've seen this page already:
>>
>> http://jikesrvm.org/Debugging+the+RVM
>>
>> The -gdb flag provides an easy way to run Jikes with gdb.  I believe
>> one
>> important advantage of using the -gdb flag is that symbols get passed
>> through to gdb, so you get more information about stack traces in Java
>> code (?).
>>
>> (3) Finally, Jikes has an interactive debugger that you can invoke by
>> sending SIQUIT to Jikes while it's running:
>>
>> pkill -SIGQUIT JikesRVM
>>
>> In previous versions of Jikes, that stopped all threads and provided
>> an
>> interactive prompt, but currently it just dumps the state of the VM
>> and
>> continues immediately (that's a known issue:
>> http://jira.codehaus.org/browse/RVM-570).
>>
>> Also, it appears that a baseline-only version of Jikes, i.e.,
>> prototype,
>> doesn't currently support the debugger.  It looks like that's
>> because the
>> TimerThread, which launches the debugger (among other things),
>> doesn't run
>> if the adaptive system isn't enabled.  I'll open a JIRA on that.  In
>> the
>> meantime I'd suggest using a configuration that includes the adaptive
>> system (AOS), e.g., prototype-opt or development or production.
>>
>> Cheers,
>> Mike
>>
>>
>>
>> On Thu, 13 Aug 2009, Colin(Du Li) wrote:
>>
>>>
>>> Hi, guys,
>>>
>>> I'm a newbie for Jikes. I wanna get some advice to debug Jikes.
>>> Now I'm using Jikes 3.1. I can import and edit Jikes source code in
>>> Eclipse.
>>> But can we launch, trace and debug Jikes in Eclipse?
>>>
>>> We can use GDB to launch Jikes, but most of Jikes source codes are
>>> written
>>> in Java, can we debug these Java source codes ?
>>>
>>> So what's the best way to trace and debug Jikes?
>>> I do appreciate your suggestions.
>>>
>>> Thanks a lot!
>>>
>>> Colin
>>> --
>>> View this message in context: http://www.nabble.com/Debugging-Jikes-tp24955377p24955377.html
>>> Sent from the jikesrvm-researchers mailing list archive at
>>> Nabble.com.
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Let Crystal Reports handle the reporting - Free Crystal Reports
>>> 2008 30-Day
>>> trial. Simplify your report design, integration and deployment -
>>> and focus on
>>> what you do best, core application coding. Discover what's new with
>>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>>> _______________________________________________
>>> Jikesrvm-researchers mailing list
>>> Jikesrvm-researchers@...
>>> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
>>>
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> 30-Day
>> trial. Simplify your report design, integration and deployment - and
>> focus on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> Jikesrvm-researchers mailing list
>> Jikesrvm-researchers@...
>> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Jikesrvm-researchers mailing list
> Jikesrvm-researchers@...
> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers

Re: [rvm-research] Debugging Jikes

by Laurence Hellyer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 21 Aug 2009, at 23:49, Michael Bond wrote:

>
> (3) Finally, Jikes has an interactive debugger that you can invoke by
> sending SIQUIT to Jikes while it's running:
>
> pkill -SIGQUIT JikesRVM
>
> In previous versions of Jikes, that stopped all threads and provided  
> an
> interactive prompt, but currently it just dumps the state of the VM  
> and
> continues immediately (that's a known issue:
> http://jira.codehaus.org/browse/RVM-570).
>
> Also, it appears that a baseline-only version of Jikes, i.e.,  
> prototype,
> doesn't currently support the debugger.  It looks like that's  
> because the
> TimerThread, which launches the debugger (among other things),  
> doesn't run
> if the adaptive system isn't enabled.  I'll open a JIRA on that.  In  
> the
> meantime I'd suggest using a configuration that includes the adaptive
> system (AOS), e.g., prototype-opt or development or production.

Hi,

Mike wrote the above in response to a question about debugging and I  
found it interesting because I never knew about this feature - it  
doesn't seem to be documented in the User guide.

Unfortunately I don't have suitable permissions to add something to  
the wiki so perhaps someone who can would be kind enough to add this?

Thanks to Mike for pointing this out.

Kind regards
Laurence

Laurence Hellyer
Research Student
Computing Laboratory
University of Kent

More info: http://www.cs.kent.ac.uk/people/rpg/lh243/


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers

Re: [rvm-research] Debugging Jikes

by Michael Bond :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Laurence,

Thanks for the suggestion.  I added some text about the debugger thread to
the user guide: http://docs.codehaus.org/display/RVM/Debugging+the+RVM

In general, everyone's encouraged to contribute to the user guide
(http://docs.codehaus.org/display/RVM/How+to+Help).  I'm not exactly sure
who has permissions to give you permissions, but you can just e-mail the
core list :)

Cheers,
Mike


On Thu, 27 Aug 2009, Laurence Hellyer wrote:

>
> On 21 Aug 2009, at 23:49, Michael Bond wrote:
>>
>> (3) Finally, Jikes has an interactive debugger that you can invoke by
>> sending SIQUIT to Jikes while it's running:
>>
>> pkill -SIGQUIT JikesRVM
>>
>> In previous versions of Jikes, that stopped all threads and provided
>> an
>> interactive prompt, but currently it just dumps the state of the VM
>> and
>> continues immediately (that's a known issue:
>> http://jira.codehaus.org/browse/RVM-570).
>>
>> Also, it appears that a baseline-only version of Jikes, i.e.,
>> prototype,
>> doesn't currently support the debugger.  It looks like that's
>> because the
>> TimerThread, which launches the debugger (among other things),
>> doesn't run
>> if the adaptive system isn't enabled.  I'll open a JIRA on that.  In
>> the
>> meantime I'd suggest using a configuration that includes the adaptive
>> system (AOS), e.g., prototype-opt or development or production.
>
> Hi,
>
> Mike wrote the above in response to a question about debugging and I
> found it interesting because I never knew about this feature - it
> doesn't seem to be documented in the User guide.
>
> Unfortunately I don't have suitable permissions to add something to
> the wiki so perhaps someone who can would be kind enough to add this?
>
> Thanks to Mike for pointing this out.
>
> Kind regards
> Laurence
>
> Laurence Hellyer
> Research Student
> Computing Laboratory
> University of Kent
>
> More info: http://www.cs.kent.ac.uk/people/rpg/lh243/
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Jikesrvm-researchers mailing list
> Jikesrvm-researchers@...
> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers