X

Sundararajan's Weblog

  • Java
    June 25, 2008

BTrace aggregations - contribution from community

Guest Author

If you have used DTrace, chances are that you have used aggregations. For performance issues, aggregated data is often more useful than individual data points. With BTrace, aggregating data is bit painful (you have to manage using Maps explicitly). It would be nice to have DTrace-style aggregation functions such as sum, max, min and so on. Glencross, Christian M (cited in my previous entry) has contributed code changes, doc and a sample for easy-to-use aggregation facility for BTrace. Please refer to the sample code (JdbcQueries.java) that demonstrates aggregations.

Now something unrelated to aggregations, but related to BTrace : I came to know about another use-case of BTrace. See also http://blog.igorminar.com/2008/06/btrace-dtrace-for-java.html

Join the discussion

Comments ( 2 )
  • Ari Savolainen Friday, June 27, 2008

    I'm getting ClassFormatError during instrumentation when using the provided JdbcQueries.java (I've tried java versions 1.6.0_05, 1.6.0_10-beta-b25 and 1.7.0-ea-b24):

    Exception in thread "Thread-10" java.lang.ClassFormatError

    at sun.instrument.InstrumentationImpl.retransformClasses0(Native Method)

    at sun.instrument.InstrumentationImpl.retransformClasses(InstrumentationImpl.java:144)

    at com.sun.btrace.agent.Main.handleNewClient(Main.java:278)

    at com.sun.btrace.agent.Main.startServer(Main.java:245)

    at com.sun.btrace.agent.Main.access$000(Main.java:53)

    at com.sun.btrace.agent.Main$1.run(Main.java:127)

    at java.lang.Thread.run(Thread.java:674)

    The same error occurs even with sample ArgArray.java. Curiously, with java 1.7 ArgArray.java works.


  • A. Sundararajan Friday, June 27, 2008

    Hi Ari Savolainen: Will you please file a bug (using Issue Tracker java.net )? If possible, please attach BTrace generated .class files (can be dumped setting com.sun.btrace.dumpClasses property to true -- please check latest BTrace start page for instructions).


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.