From kato-dev-return-275-apmail-incubator-kato-dev-archive=incubator.apache.org@incubator.apache.org Mon Jan 04 12:11:11 2010 Return-Path: Delivered-To: apmail-incubator-kato-dev-archive@minotaur.apache.org Received: (qmail 73865 invoked from network); 4 Jan 2010 12:11:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Jan 2010 12:11:11 -0000 Received: (qmail 37183 invoked by uid 500); 4 Jan 2010 12:11:11 -0000 Delivered-To: apmail-incubator-kato-dev-archive@incubator.apache.org Received: (qmail 37148 invoked by uid 500); 4 Jan 2010 12:11:11 -0000 Mailing-List: contact kato-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: kato-dev@incubator.apache.org Delivered-To: mailing list kato-dev@incubator.apache.org Received: (qmail 37135 invoked by uid 99); 4 Jan 2010 12:11:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jan 2010 12:11:11 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of spoole167@googlemail.com designates 209.85.218.210 as permitted sender) Received: from [209.85.218.210] (HELO mail-bw0-f210.google.com) (209.85.218.210) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jan 2010 12:11:00 +0000 Received: by bwz2 with SMTP id 2so8505881bwz.20 for ; Mon, 04 Jan 2010 04:10:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=qtvVoUYy2aQlt9NYp8jMpHEfad2K3fE5+T0GkCVH2EU=; b=ssR0Q4Ioku928zxBw3TASTHQLp+cI13kfkGJtZkYn+UzI8CJKL9nhzKI1zFgMBQJkP A+DA/wxWSyBAVKdMoGt2uW2Rj8A9hDMoLAU2aLIz2694cg6XGGVweX9moKX9vRkYTNOm xbGrnkzHiLSS9aKKw5Bag9r1/INASTj614KRw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=UbxoAYZD039eo8RdKVAmdoq6pGGLt45rKwAlDdpbKJskJ7IeydZ1QikcdxWpQWPy9L wdnbzWGtPlfNOKaeWdAKRRmqMw8HMWxINMa8jBJnxpWS5xjZYLHVoMTnydAdS1mDNKbT fy03CaVvmdkZ9XxTFz11JVwb3E5rATKOxCwA4= MIME-Version: 1.0 Received: by 10.204.25.19 with SMTP id x19mr12305220bkb.189.1262607039706; Mon, 04 Jan 2010 04:10:39 -0800 (PST) Date: Mon, 4 Jan 2010 12:10:39 +0000 Message-ID: Subject: Pure Java Dump concept From: Steve Poole To: kato-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=000325559fce17b684047c559c61 X-Virus-Checked: Checked by ClamAV on apache.org --000325559fce17b684047c559c61 Content-Type: text/plain; charset=ISO-8859-1 Over the holidays I've been working on a prototype of a 100% Java dump generator and reader. I wanted to have an easy way for us to explore the Snapshot API concept. The idea is that by doing this in Java it will be much easier for us to prototype (rather than doing this in C) and for others to use immediately. My prototype consists of code that utilises the xstream project ( http://xstream.codehaus.org) as a quick means of serialising and deserialising a bunch of java objects. XStream serialises to XML. Its human readable and Xstream also deals with object references so that you get back a properly formed graph of objects. I added in info from the JMX beans etc and that gave me something like that included below (this is a flavor rather than a full dump) A lot of the data comes for free just by telling Xstream to serialise an object - but in some cases to remove the implementation specific nature of serialisation I created a neutral version that was serialised instead. As you can see this is easy to read and is not as fragile as normal serialisation. At the bottom of the example is a tag which is where I've added a trivial serialisation of a JavaRuntime from the CJVMTI project. The reader side just deserialises the model and its ready for use. With this sort of approach we can focus on discussing and prototyping the Snapshot API - how we determine what information goes into the model and how its described. Comments?
2010-01-04 11:45:29.718 GMT
x86 2 Linux 0.22 2.6.31-16-generic /usr/lib/j2sdk1.6-ibm/jre/lib/vm.jar /usr/lib/j2sdk1.6-ibm/jre/lib/javascript.jar /home/spoole/workspace/code/target/classes -Xdump -Djava.class.path=. -Dfile.encoding=UTF-8 /usr/lib 1.0 6728@jazzette Java Virtual Machine Specification Sun Microsystems Inc. 1.0 1262605529447 file.encoding UTF-8 user.home /home/spoole 341 IBM J9 VM IBM Corporation 2.4 true DISPLAY :0.0 6 5 4 297018627 296990135 1 main RUNNABLE false true 0 -1 0 -1 -1 com.ibm.lang.management.ThreadMXBeanImpl.dumpAllThreadsImpl(Native Method) com.ibm.lang.management.ThreadMXBeanImpl.dumpAllThreads(ThreadMXBeanImpl.java:680) org.apache.kato.jdump.builder.ThreadTemplateBuilder.buildTemplate(ThreadTemplateBuilder.java:20) org.apache.kato.jdump.builder.ThreadTemplateBuilder.buildTemplate(ThreadTemplateBuilder.java:25) org.apache.kato.jdump.builder.DumpBuilder.buildDump(DumpBuilder.java:15) org.apache.kato.jdump.CreateDump.main(CreateDump.java:25) 9 JIT Compilation Thread RUNNABLE false false 0 -1 0 -1 -1 0 0 Java heap J9 GC true 609 609 0 j9jit24 298 true 1 1 5 0 0 main 0
-- Steve --000325559fce17b684047c559c61--