Comments (3)
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.
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.
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)
- Does not support high resolution HOT 2
- Release 1.36 Please HOT 6
- {"result":"{\"error\":515,\"message\":\"Unable to detect JVM version or GC type from the log file.\"}"} HOT 2
- Total promotion can get negative HOT 8
- 时间区间缺少png自动选择功能 HOT 1
- Error parsing openjdk 11 logs HOT 1
- OpenJDK - additional tags fail parsing HOT 1
- SEVERE [DataReaderFactory]: Failed to recognize file format. HOT 5
- macOS - Application hangs when quitting
- Error when open file HOT 2
- Parse problem for Java 11 Unified GC logging format HOT 1
- GCViewerForQianKunZhao HOT 1
- What do you think of changing the license to Apache 2.0? HOT 3
- Failed to parse gc event "Merge Heap Roots" on Adopt OpenJDK 17 HOT 1
- The reported freed memory is incorrect
- Java 17 ready version ? HOT 1
- Tenured Generation graph not showing up when using openJDK 11 HOT 2
- The environment variable JAVA_HOME is not correctly set. HOT 1
- Wrong graph display when open series HOT 4
- Parse xml G1GC on openjdk9 error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gcviewer.