public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Java VM support in SystemTap
@ 2006-07-07 19:54 Danilov, Oleg V
  2006-07-07 21:25 ` Frank Ch. Eigler
  0 siblings, 1 reply; 5+ messages in thread
From: Danilov, Oleg V @ 2006-07-07 19:54 UTC (permalink / raw)
  To: systemtap

[-- Attachment #1: Type: text/plain, Size: 726 bytes --]

Hi all,

Inspired by the SUN DTrace ability to provide insight information about running java applications we think it makes sense to add this ability to the SystemTap as well. Basically we need a framework which allows investigation of the behavior of underlying operating system combined with the insight information about running Java applications. This can assist in identifying the underlying cause of a performance or functional problem. SystemTap simplify gathering of information about Linux kernel and it is possible to add support of the user applications. An attached document describes our vision on how Java VM support could be integrated into the SystemTap.

Your comments are welcome.

Thanks,
  Oleg


[-- Attachment #2: SystemTap and Java.pdf --]
[-- Type: application/octet-stream, Size: 114590 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread
* RE: Java VM support in SystemTap
@ 2006-07-10 22:09 Scherbakov, Sergey V
  2006-07-11 16:13 ` Frank Ch. Eigler
  0 siblings, 1 reply; 5+ messages in thread
From: Scherbakov, Sergey V @ 2006-07-10 22:09 UTC (permalink / raw)
  To: fche; +Cc: systemtap

Frank,

I'm coauthor of that proposal. First of all, thanks for the quick
evaluation. Please see my question/comments inlined.


-----Original Message-----
From: fche@redhat.com [mailto:fche@redhat.com] 


> The key trick is the notion of using stpd as an intermediary between
> user-space event sources (in this case, JVM instrumentation hooks
> talking to a specialized systemtap-bundled supervisor program) and
> normal kernel-space probe handlers.

Is it means that we really can use stpd as gate between VM and
kernel-space probe handlers? I'm asking because our ideas based not on
deep knowledge of SystemTap but mostly on common sense. 

> This is interesting because it suggests a mechanism for general
> user-space probing, where instead of using JVM[TPD]I APIs, a specially
> built user-space supervisor program could use ptrace or utrace or
> whatever to manage a non-JVM program.  It could relay this occurrence
> to kernel-side probe handlers via stpd.

If you think, it is interesting not only for using with Java VM may be
it is good idea to extend/generalize that communication interface?

> A consequence of this type of approach is to suffer multiple context
> switches per probe hit.  Further, if these supervisor programs are
> general (not parametrized for the particular probe script), then the
> quantity of contextual data would be strictly limited.  That's
> because, for several reasons, all plausible $target data would need to
> be collected at probe-hit time, and packaged up in the first packet
> toward stpd to relay to kernel-space.  (Explicit request/reply type
> interaction from the kernel probe handlers is not going to work.)

Yes, agree. It is an issue. It is why in case of VM we propose to use
special command 'RequestOptionalData' to describe expected data and
avoid unnecessary context switches.

Thanks
  Sergey

^ permalink raw reply	[flat|nested] 5+ messages in thread
* RE: Java VM support in SystemTap
@ 2006-07-13  9:51 Scherbakov, Sergey V
  0 siblings, 0 replies; 5+ messages in thread
From: Scherbakov, Sergey V @ 2006-07-13  9:51 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: systemtap

Frank,

We took one-day timeout to read about 'plan B' and discuss your really
useful ideas/comments between us. 

Actually, in beginning of our researches we were thinking about similar
model. We are planned to set a breakpoint to some stab inside JVMTI/PI
agent and then use kernel probe scenario. Unfortunately in this case we
have a lot of almost undecidable issues. 

I guess the main issue that in case of kernel/user probe we know
address, we can unwind stack etc., on other hand (JVM) we have only
event of some class (MethodEnter for instance). We even cannot set a
breakpoint in JIT-ed function (we know its address), because it is
possible to have more that one JIT-ed variant, but VM can choose to use
interpreter. Sure we can generate C/C++ stub corresponding every method
of interest, but it is really difficult (almost impossible in case of
wildcards usage).  

Frank Ch. Eigler wrote:

> My point is that if the "optional data" is a function of the probe
> script (say, the list of actual $obj->obj2->field expressions used),
> and if this list is not available ahead of time to the user-side
> intermediary programs, then the kernel-side probes won't be able to
> get at them at all.  The kernel-side probe handlers cannot practically
> query them during hit time.

The following is a quotation from our internal discussion:

--  The optional data needed [$obj->obj2->field] is defined at script
start --  time.  This could in theory be passed thru stpd to the VM
agent at
--   configuration time.  [i.e., the "RequestOptionalData" could all be
set --  up ahead of time...]
--  e.g.
--      p=RegisterProbe("java/lang/...",enter);
--      RequestOptionalData(p, PARAMETER1,...);
--   
--  Then when the event occurs, the VM agent bundles the event with the 
--  registeredOptionalData and sends it as a packet to stpd who forwards
to --  kernel.  The kernel component won't need to request additional
stuff at --  run time.

Thanks,
   Sergey

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-07-13  9:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-07 19:54 Java VM support in SystemTap Danilov, Oleg V
2006-07-07 21:25 ` Frank Ch. Eigler
2006-07-10 22:09 Scherbakov, Sergey V
2006-07-11 16:13 ` Frank Ch. Eigler
2006-07-13  9:51 Scherbakov, Sergey V

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).