public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Lukas Berk <lberk@redhat.com>
To: Mark Wielaard <mjw@redhat.com>
Cc: systemtap@sourceware.org, distro-pkg-dev@openjdk.java.net
Subject: Re: [RFC] Enhanced Garbage Collection Probe Points
Date: Wed, 08 Aug 2012 14:01:00 -0000	[thread overview]
Message-ID: <20120808140059.GA3172@redhat.com> (raw)
In-Reply-To: <1344340231.2974.76.camel@springer.wildebeest.org>


[-- Attachment #1.1: Type: text/plain, Size: 3497 bytes --]

* Mark Wielaard <mjw@redhat.com> [2012-08-07 07:50]:
[...]
> If you could post eventcount.stp with some comments that would be really
> helpful (even if it is just a work in progress) to better understand the
> "meaning" of the new probe points for a Garbage Collector noob like me.

Sure! I've added in comments below to the output I attached in the last
email. I've also attached the tapset/script I've written and have been
using with documentation.  For those of you using sytemtap, to use the
probe points, apply my original patch to icedtea, build, and then when
using stap, $stap -I /path/to/gc_details.stp <script.stp>

Finished event counting at Fri Aug  3 10:09:35 2012 EDT.
Total time elapsed: 1021574 ms, 63 events total, 63 after filtering.
TID                       EVENT                          COUNT (RATE Hz)
---                       -----                          ---------------
java(4998)                hotspot.gc_collect_parallel    1 (0.00)
^ This is a _full_ parallel collection of all objects from the program,
typically done when called explicitly with a System.gc() or at the end
of the program.  All of my collect type of probes also have a 'cause'
parameter for what initiated the gc.

java(5003)                hotspot.gc_collect_PSScavenge_begin 10 (0.00)
java(5003)                hotspot.gc_collect_PSScavenge_end 10 (0.00)
^ This marks the beginning and end of a parallel scavenge, I've marked
the beginning and end points in case there are concurrent parallel
scavenges going on.  (scavenges are partial garbage collections, so they
should happen much more often throughout the runtime of the program)

java(5003)                hotspot.gc_collect_delete      2 (0.00)
^ This is a marker of an actual deletion of an object, I need to get
better coverage of these types of statements, however its a starting point

java(5003)                hotspot.gc_collect_PSParallelCompact_end 2
(0.00)
^ This parallel compaction (and the matching begin below) is where a
compaction of an object space occurs, the tapset/script I'm using
(attached with documentation) will also note the cause

java(5003)                hotspot.gc_collect_test        1 (0.00)
^ This probe point should read gc_collect_parallel, I need to adjust it
within my tapset/script.
java(5003)                hotspot.gc_collect_move        3 (0.00)
^ This move probe shows when an object and its addresses are moved (It
will show the top/bottom of the old address space it occupied and the
new top/bottom addresses) 

java(5003)                hotspot.gc_collect_PSParallelCompact_begin 2
(0.00)
java(5077)                hotspot.gc_collect_PSScavenge_begin 5 (0.00)
java(5077)                hotspot.gc_collect_PSScavenge_end 5 (0.00)
java(5139)                hotspot.gc_collect_PSScavenge_end 2 (0.00)
java(5139)                hotspot.gc_collect_PSScavenge_begin 2 (0.00)
java(5330)                hotspot.gc_collect_PSScavenge_begin 4 (0.00)
java(5330)                hotspot.gc_collect_PSScavenge_end 4 (0.00)
java(5776)                hotspot.gc_collect_PSScavenge_end 1 (0.00)
java(5776)                hotspot.gc_collect_PSScavenge_begin 1 (0.00)
java(5827)                hotspot.gc_collect_PSScavenge_end 2 (0.00)
java(5827)                hotspot.gc_collect_PSScavenge_begin 2 (0.00)
java(5864)                hotspot.gc_collect_PSScavenge_end 2 (0.00)
java(5864)                hotspot.gc_collect_PSScavenge_begin 2 (0.00)


[-- Attachment #1.2: gc_details.stp --]
[-- Type: text/plain, Size: 11244 bytes --]

/*
 * probe - gc_collect_contig
 * 
 * @name: gc_collect_contig
 * @is_full: If TRUE, attempt a full collection of the generation
 * @size: word size to be cleaned
 * @is_tlab: Is this a Thread Local Allocation Buffer?
 *
 * Description: This marks the collection of one contiguous space generation
 * 
 */

probe hotspot.gc_collect_contig = 
  process("/home/lberk/code/icedtea7/build/openjdk.build-debug/j2sdk-image/jre/lib/amd64/server/libjvm.so").mark("gc__collection__contig")
{

  name = "gc_collect_contig";
  is_full = $arg2;
  size = $arg3;
  is_tlab = $arg4;
  probestr = sprintf("%s(is_full='%d', size='%d', is_tlab='%d')", name, is_full, size, is_tlab);

}

/*
 * probe - gc_collect_parnew
 * 
 * @name: gc_collect_parnew
 * @is_full: If TRUE, attempt a full collection of the generation
 * @size: word size to be cleaned
 * @is_tlab: Is this a Thread Local Allocation Buffer?
 *
 * Description: This marks the collection of a new parallel new generation.
 * This is different than a gc_collect_parallel generation due to it being
 * specifically defined as a parNewGeneration
 * 
 */

probe hotspot.gc_collect_parnew = 
  process("/home/lberk/code/icedtea7/build/openjdk.build-debug/j2sdk-image/jre/lib/amd64/server/libjvm.so").mark("gc__collection__parnew")
{

  name = "gc_collect_parnew";
  is_full = $arg2;
  size = $arg3;
  is_tlab = $arg4;
  probestr = sprintf("%s(is_full='%d', size='%d', is_tlab='%d')", name, is_full, size, is_tlab);

}

/*
 * probe - gc_collect_defnew
 * 
 * @name: gc_collect_defnew
 * @is_full: If TRUE, attempt a full collection of the generation
 * @size: word size to be cleaned
 * @is_tlab: Is this a Thread Local Allocation Buffer?
 *
 * Description: A collection of a newly defined generation
 * 
 */

probe hotspot.gc_collect_defnew = 
  process("/home/lberk/code/icedtea7/build/openjdk.build-debug/j2sdk-image/jre/lib/amd64/server/libjvm.so").mark("gc__collection__defnew")
{

  name = "gc_collect_defnew";
  is_full = $arg2;
  size = $arg3;
  is_tlab = $arg4;
  probestr = sprintf("%s(is_full='%d', size='%d', is_tlab='%d')", name, is_full, size, is_tlab);

}

/*
 * probe - gc_collect_tenured
 * 
 * @name: gc_collect_tenured
 * @is_full: If TRUE, attempt a full collection of the generation
 * @size: word size to be cleaned
 * @is_tlab: Is this a Thread Local Allocation Buffer?
 *
 * Description: This is a collection of a tenured generation (a geneartion
 * that has survived multiple garbage collections and is now in a 'tenured'
 * object space.
 * 
 */

probe hotspot.gc_collect_tenured = 
  process("/home/lberk/code/icedtea7/build/openjdk.build-debug/j2sdk-image/jre/lib/amd64/server/libjvm.so").mark("gc__collection__tenured")
{

  name = "gc_collect_tenured";
  is_full = $arg2;
  size = $arg3;
  is_tlab = $arg4;
  probestr = sprintf("%s(is_full='%d', size='%d', is_tlab='%d')", name, is_full, size, is_tlab);

}

/*
 * probe - gc_collect_parallel
 * 
 * @name: gc_collect_parallel
 * @address: address of object being collected
 * @cause: cause of the collection
 * 
 * Description: This is a parallel collection, where the jvm process don't
 * have to halt while the gc is being completed
 */

probe hotspot.gc_collect_parallel =
  process("/home/lberk/code/icedtea7/build/openjdk.build-debug/j2sdk-image/jre/lib/amd64/server/libjvm.so").mark("gc__collection__parscavenge")
{
  name = "gc_collect_parallel";
  address = sprintf("0x%x", $arg1);
  cause = $arg2;
  probestr = sprintf("%s(address='%s', cause='%d')", name, address, cause);
}

/*
 * probe - gc_collect_test
 * 
 * @name: gc_collect_parallel
 * @address: address of object being collected
 * @cause: cause of the collection
 *
 * Description: Another placement of a parallel collection
 * 
 */

probe hotspot.gc_collect_test =
  process("/home/lberk/code/icedtea7/build/openjdk.build-debug/j2sdk-image/jre/lib/amd64/server/libjvm.so").mark("gc__collection__partest1")
{
  name = "gc_collect_parallel";
  address = sprintf("0x%x", $arg1);
  cause = $arg2;
  probestr = sprintf("%s(address='%s', cause='%d')", name, address, cause);
}

/*
 * probe - gc_collect_G1
 * 
 * @name: gc_collect_G1
 * @address: address of object being collected
 * @cause: cause of the collection
 *
 * Description: A G1 style garbage collection (halt the world garbage collection)
 * 
 */

probe hotspot.gc_collect_G1 =
  process("/home/lberk/code/icedtea7/build/openjdk.build-debug/j2sdk-image/jre/lib/amd64/server/libjvm.so").mark("gc__collection__G1")
{
  name = "gc_collect_g1";
  address = sprintf("0x%x", $arg1);
  cause = $arg2;
  probestr = sprintf("%s(address='%s', cause='%d')", name, address, cause);
}

/*
 * probe - gc_collect_delete
 * 
 * @name: gc_collect_delete
 * @address: address of object being collected
 * @cause: cause of the collection
 *
 * Description: A delete statement of an obeject
 * 
 */

probe hotspot.gc_collect_delete =
  process("/home/lberk/code/icedtea7/build/openjdk.build-debug/j2sdk-image/jre/lib/amd64/server/libjvm.so").mark("gc__collection__delete")
{
  name = "gc_collect_delete";
  address = sprintf("0x%x", $arg1);
  probestr = sprintf("%s(address='%s')", name, address);
}

/*
 * probe - gc_collect_PSScavenge_begin
 * 
 * @name: gc_collect_PSScavenge_begin
 * @address: address of scavenge
 * @cause: cause of the collection
 *
 * Description: A parallel scavenge begins.  A scavenge is a partial garbage
 * collection which should be much more common than a full garbage collection
 * throughout the course of the java program.
 * 
 */

probe hotspot.gc_collect_PSScavenge_begin =
  process("/home/lberk/code/icedtea7/build/openjdk.build-debug/j2sdk-image/jre/lib/amd64/server/libjvm.so").mark("gc__collection__PSScavenge__begin")
{
  name = "gc_collect_PSScavenge_begin";
  address = sprintf("0x%x", $arg1);
  cause = $arg2;
  probestr = sprintf("%s(address='%s', cause='%d')", name, address, cause);
}

/*
 * probe - gc_collect_PSScavenge_end
 * 
 * @name: gc_collect_PSScavenge_end
 * @address: address of scavenge
 * @cause: cause of the collection
 *
 * Description: The end of the parallel scavenge.  The beginning and end of
 * the scavenge is noted due to the possbility of multiple scavenges occuring
 * at the same time
 * 
 */

probe hotspot.gc_collect_PSScavenge_end =
  process("/home/lberk/code/icedtea7/build/openjdk.build-debug/j2sdk-image/jre/lib/amd64/server/libjvm.so").mark("gc__collection__PSScavenge__end")
{
  name = "gc_collect_PSScavenge_end";
  address = sprintf("0x%x", $arg1);
  cause = $arg2;
  probestr = sprintf("%s(address='%s', cause='%d')", name, address, cause);
}

/*
 * probe - gc_collect_PSParallelCompact_begin
 * 
 * @name: gc_collect_PSParallelCompact_begin
 * @address: address of compaction
 * @cause: cause of the collection
 *
 * Description: A parallel compaction of a memory space
 * 
 */

probe hotspot.gc_collect_PSParallelCompact_begin =
  process("/home/lberk/code/icedtea7/build/openjdk.build-debug/j2sdk-image/jre/lib/amd64/server/libjvm.so").mark("gc__collection__PSParallelCompact__begin")
{
  name = "gc_collect_PSParallelCompact_begin";
  address = sprintf("0x%x", $arg1);
  cause = $arg2;
  probestr = sprintf("%s(address='%s', cause='%d')", name, address, cause);
}

/*
 * probe - gc_collect_PSParallelCompact_end
 * 
 * @name: gc_collect_PSParallelCompact_end
 * @address: address of compaction
 * @cause: cause of the collection
 *
 * Description: A parallel compaction of a memory space
 * 
 */

probe hotspot.gc_collect_PSParallelCompact_end =
  process("/home/lberk/code/icedtea7/build/openjdk.build-debug/j2sdk-image/jre/lib/amd64/server/libjvm.so").mark("gc__collection__PSParallelCompact__end")
{
  name = "gc_collect_PSParallelCompact_end";
  address = sprintf("0x%x", $arg1);
  cause = $arg2;
  probestr = sprintf("%s(address='%s', cause='%d')", name, address, cause);
}

/*
 * probe - gc_collect_PSMarkSweep_begin
 * 
 * @name: gc_collect_PSMarkSweep_begin
 * @address: address of parallel mark sweep process
 * @cause: cause of the collection
 *
 * Description: A parallel mark sweep of objects needed for collection begins
 * 
 */

probe hotspot.gc_collect_PSMarkSweep_begin =
  process("/home/lberk/code/icedtea7/build/openjdk.build-debug/j2sdk-image/jre/lib/amd64/server/libjvm.so").mark("gc__collection__PSMarkSweep__begin")
{
  name = "gc_collect_PSMarkSweep_begin";
  address = sprintf("0x%x", $arg1);
  cause = $arg2;
  probestr = sprintf("%s(address='%s', cause='%d')", name, address, cause);
}

/*
 * probe - gc_collect_PSMarkSweep_end
 * 
 * @name: gc_collect_PSMarkSweep_end
 * @address: address of parallel mark sweep process
 * @cause: cause of the collection
 *
 * Description: A parallel mark sweep of objects needed for collection ends
 * 
 */

probe hotspot.gc_collect_PSMarkSweep_end =
  process("/home/lberk/code/icedtea7/build/openjdk.build-debug/j2sdk-image/jre/lib/amd64/server/libjvm.so").mark("gc__collection__PSMarkSweep__end")
{
  name = "gc_collect_PSMarkSweep_end";
  address = sprintf("0x%x", $arg1);
  cause = $arg2;
  probestr = sprintf("%s(address='%s', cause='%d')", name, address, cause);
}

/*
 * probe - gc_collect_move
 * 
 * @name: gc_collect_move
 * @from_bottom_address: the bottom address of the object being moved
 * @from_top_address: the top address of the object being moved
 * @to_bottom_address: the bottom address of where the object is being moved to
 * @to_top_address: the top address of where the object is being moved to
 * @cause: cause of the collection
 *
 * Description: During garbage collections there are times where objects or 
 * blocks of memory need to be moved.  This probe will detail from where 
 * the memory is moving and where to.
 * 
 */

probe hotspot.gc_collect_move =
  process("/home/lberk/code/icedtea7/build/openjdk.build-debug/j2sdk-image/jre/lib/amd64/server/libjvm.so").mark("gc__collection__move")
{
  name = "gc_collect_move";
  from_bottom_address = sprintf("0x%x", $arg1);
  from_top_address = sprintf("0x%x", $arg2);
  to_bottom_address = sprintf("0x%x", $arg3);
  to_top_address = sprintf("0x%x", $arg4);
  probestr = sprintf("%s(from_bottom_address='%s', from_top_address='%s', to_bottom_address='%s', to_top_address='%s')", name, from_bottom_address, from_top_address, to_bottom_address, to_top_address);

}

/*
 * probe - gc_collect_clear
 * 
 * @name: gc_collect_clear
 * @address: address of object being collected
 * @cause: cause of the collection
 *
 * Description: This probe dictates the region of data that needs to be 
 * cleared in a compaction action
 * 
 */

probe hotspot.gc_collect_clear =
  process("/home/lberk/code/icedtea7/build/openjdk.build-debug/j2sdk-image/jre/lib/amd64/server/libjvm.so").mark("gc__collection__ParallelCompact__clear")
{
  name = "gc_collect_clear";
  region_data = sprintf("0x%x", $arg1);
  data_location = sprintf("0x%x", $arg2);
  probestr = sprintf("%s(region_data='%s', data_location='%s')", name, region_data, data_location);
  
}

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-08-08 14:01 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-02 13:11 Lukas Berk
2012-08-03 13:56 ` Mark Wielaard
2012-08-03 14:23   ` Lukas Berk
2012-08-07 11:50     ` Mark Wielaard
2012-08-08 14:01       ` Lukas Berk [this message]
2012-08-08 14:34         ` Mario Torre
2012-08-08 20:37 ` Jon VanAlten
2012-08-08 21:11   ` Lukas Berk
2012-08-08 22:05     ` Jon VanAlten
2012-08-22 20:34 ` Lukas Berk
2012-08-24 19:59   ` Jon VanAlten
2012-08-28 21:23     ` Lukas Berk
2012-08-29 11:52       ` Mark Wielaard
2012-08-30  1:19       ` Jon VanAlten
2012-08-31 20:07         ` Lukas Berk
2012-09-24 18:17           ` Jon VanAlten
2012-10-23 16:53             ` Lukas Berk
2012-10-25  5:02               ` Jon VanAlten
2012-10-25 13:09                 ` Andrew Hughes
2012-10-30  1:49                   ` Jon VanAlten
2012-10-30  8:03                     ` Mark Wielaard
2012-10-30 12:37                     ` Andrew Hughes
2012-11-01 18:33                       ` Jon VanAlten
2012-11-01 19:06                         ` Mark Wielaard
2012-11-01 22:12                           ` Jon VanAlten
2012-11-02 14:54                           ` Andrew Hughes
2012-11-02 15:03                             ` Mark Wielaard

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=20120808140059.GA3172@redhat.com \
    --to=lberk@redhat.com \
    --cc=distro-pkg-dev@openjdk.java.net \
    --cc=mjw@redhat.com \
    --cc=systemtap@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).