From: Erik.Ostermueller@fisglobal.com (Ostermueller, Erik)
Subject: [lttng-dev] tracing of non-JNI java in IBM jvm
Date: Wed, 23 Jan 2013 18:03:15 +0000 [thread overview]
Message-ID: <A94B468263DDE2448A14367F590EB97301D12EC3@ltcfiswmsgmb15> (raw)
In-Reply-To: <439402897.6438391.1357930537656.JavaMail.root@vmware.com>
Aaron,
Sorry to have disappeared from this discussion.
What if we went is a slightly different direction.
The InTrace tool (http://mchr3k.github.com/org.intrace/) will log start/stop times of dynamically instrumented methods to a text file (proprietary format).
What if we simply wrote a process to convert that log to CTF, and view the trace with the lttng eclipse plug-in, unmodified.
The idea would be to, at first, just support these two views:
http://wiki.eclipse.org/Linux_Tools_Project/LTTng/User_Guide#Control_Flow_View
http://wiki.eclipse.org/Linux_Tools_Project/LTTng/User_Guide#Statistics_View
--Erik
-----Original Message-----
From: Aaron Spear [mailto:aspear@vmware.com]
Sent: Friday, January 11, 2013 12:56 PM
To: Ostermueller, Erik
Cc: lttng-dev at lists.lttng.org; Alexandre Montplaisir
Subject: Re: [lttng-dev] tracing of non-JNI java in IBM jvm
----- Original Message -----
> From: "Erik Ostermueller" <Erik.Ostermueller@fisglobal.com>
> To: "Alexandre Montplaisir" <alexmonthy at voxpopuli.im>
> Cc: lttng-dev at lists.lttng.org
> Sent: Friday, January 11, 2013 9:26:51 AM
> Subject: Re: [lttng-dev] tracing of non-JNI java in IBM jvm
>
> Thanks Alex for the quick reply....now I get it.
> I'll jump in on that other thread you mentioned.
>
> There is a tool called InTrace that does some of this work.
> Perhaps some design ideas or even code could be stolen from here:
> http://mchr3k.github.com/org.intrace/
> This project:
> * implements the java.lang.instrumentation api, which can be used to
> plug a tracing tool into an already-running JVM.
> * allows you to instrument/de-instrument various classes without
> restarting the JVM.
> * Uses http://asm.ow2.org/ to inject byte code for entry/exit tracing
> methods.
> * stores thread id (good) but does nothing to sort/organize activity
> by thread id into a session(bad)
> * no graphing/aggregating of performance metrics...just displays
> entry/exit times, method parameters, etc...
Hi Erik,
I think that what you are mentioning is certainly one thing that is needed. To me I see a couple of different components here:
1) implementation of java.util.logging interfaces as well as SLF4J interfaces, as well as a dedicated LTTng java API for registering custom event typess. This would be used for static, compile time instrumentation of java apps.
2) an implementation that uses the tooling you mention above for dynamic instrumentation of any running java app. You basically would define trace and install trace points on the fly. This would be really, really powerful.
The implementations of the above would have to be quite different from the way that things are done currently with UST. Currently UST uses macros in C files to define the various tracepoints statically. We would need to have API's that could be called dynamically to define tracepoints, so that the java code could do this. I have not actually looked under the hood with the current UST implementation to see what the implications are for this.
It seems to me that we would want to have a Java API usage similar to what you can do with SLF4J:
class MyClass {
private static final Tracer tracer = LTTngFactory.getTracer("MyComponentName");
private static final String MY_TRACEPOINT = "MyTracepointWithIntegerStringAndLong";
static {
// register a tracepoint. this goes through JNI and creates a tracepoint
// in UST that has the given name and the specified objects
tracer.registerTracepoint(MY_TRACEPOINT,
new Object[]{Integer.class,String.class,Long.class});
}
public void someMethod() {
Integer someInteger = 123456;
String someString = "this is the string";
Long someLong = 56789;
tracer.trace(MY_TRACEPOINT,someInteger,someString,someLong);
}
}
Then over the top of this you have implementations of SLF4J, java.util.logging, whatever. The infrastructure required in the JNI side for this would be the same implementation needed by the binding to the InTrace technology to dynamically create tracepoints.
I need all of this right now, and am willing to spend time in the next few months to implement it.
cheers,
Aaron Spear, Staff Engineer, VMware Inc
_____________
The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.
next prev parent reply other threads:[~2013-01-23 18:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-10 22:52 Ostermueller, Erik
2013-01-11 15:51 ` Alexandre Montplaisir
2013-01-11 16:26 ` Ostermueller, Erik
2013-01-11 18:55 ` Aaron Spear
2013-01-23 18:03 ` Ostermueller, Erik [this message]
2013-01-23 19:45 ` Aaron Spear
2013-01-23 21:46 ` Ostermueller, Erik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=A94B468263DDE2448A14367F590EB97301D12EC3@ltcfiswmsgmb15 \
--to=erik.ostermueller@fisglobal.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox