Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BTRACE-36] As a BTrace User I would like to be able to view the memory usage of the different memory pools #47

Closed
jbachorik opened this issue Aug 28, 2014 · 2 comments

Comments

@jbachorik
Copy link
Collaborator

[reporter="joachimhskeie", created="Wed, 27 Jan 2010 17:25:12 +0100", resolved="Fri, 9 Jul 2010 16:18:58 +0200"]

BTraceUtils have heapUsage() and nonHeapUsage() methods. However, I would also like to be able to get the memory usage for the other memory pools like new generation, old generation and the surviorspace as well as the permanent generation.

@jbachorik jbachorik added this to the release-1.2 milestone Aug 28, 2014
@jbachorik
Copy link
Collaborator Author

[author="joachimhskeie", created="Tue, 18 May 2010 20:26:54 +0200"]

Adding comments from Email, along with a diff file.

I have made some changes to the BTrace core to make it possible to get information regarding the individual Memory Pools the JVM uses. I have implemented this feature using Object arrays and format string in a similar fashion to printAggregation.

The BTrace script would then do something like the following to print out a formatted string for each memory pool:

String execStringFormat = strcat("[MemoryPool;", property("btrace.agentname"));
println(getMemoryPoolUsage(strcat(execStringFormat, ";%1$s;%2$d;%3$d;%4$d;%5$d;Memory]")));

I am attaching the diff file for BTrace (My Eclipse reorganized the imports in alphabetical order, feel free to remove this part of the patch if you dont want them sorted that way).

@jbachorik
Copy link
Collaborator Author

[author="jbachorik", created="Fri, 9 Jul 2010 16:18:58 +0200"]

I've pushed your proposed changes since to save you from adapting to the changes in BTraceUtils which span rather big part of the file.

Fixed http://kenai.com/projects/btrace/sources/hg/revision/323

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant