Coder Social home page Coder Social logo

Comments (3)

ecki avatar ecki commented on June 23, 2024

With this code, it works for now:

    for (Iterator i = model.getGCEvents(); i.hasNext();) {
        GCEvent event = (GCEvent) i.next();

        if (event.getGeneration() != Generation.YOUNG)
            continue;

        GCEvent young = event.getYoung();

        if (young.getType() == Type.UNDEFINED)
            continue;

from gcviewer.

chewiebug avatar chewiebug commented on June 23, 2024

Hi Bernd,

You are right, "getGeneration()" doesn't consider detail information of
an event. The parser usually adds a new detail event for every "[ ... ]"
information in a gc log.

So
"6.765: [GC [1 CMS-initial-mark: 0K(25165824K)] 410644K(47815104K),
0.0100670 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] "
results in a main event "GC" (considered YOUNG) and a "CMS-initial-mark"
(considered TENURED) event as detail event inside the GC event.

getGeneration() just returns the main events generation, which is not
accurate in many cases.

I have pushed a fix to return the correct generation. In the case of
initial-mark now TENURED is returned. If more than one generation is
contained, ALL is returned.

If you want to be sure to find all events containing explicit YOUNG
generation information, you should consider all with getGeneration()==
YOUNG and those with getGeneration()==ALL and event.getYoung().getType()
!= UNDEFINED. By the way: Type == UNDEFINED means, that the event in the
logfile didn't contain any information about that generation but I
derived it from the present information (for initial-mark there is only
TENURED generation available in the logfile but it is easy to calculate,
what the size of the YOUNG generation was -> the type of the YOUNG
generation detail event is UNDEFINED).

Regards, Jörg

Am 29.09.2012 03:09, schrieb Bernd:

With this code, it works for now:

| for (Iterator i = model.getGCEvents(); i.hasNext();) {
GCEvent event = (GCEvent) i.next();

     if (event.getGeneration() != Generation.YOUNG)
         continue;

     GCEvent young = event.getYoung();

     if (young.getType() == Type.UNDEFINED)
         continue;

|
|


Reply to this email directly or view it on GitHub
#37 (comment).

from gcviewer.

ecki avatar ecki commented on June 23, 2024

I wanted to restrict the export to real events, no synthetic timestamps. This worked in my code case, but I will adjust it, need to check which UNDEFINED to include later on, when I export oldgen statistics as well.

from gcviewer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.