VisualVM

VisualVM profiling is polluting results

北城以北 提交于 2019-12-24 11:54:12
问题 I am using VisualVM memory profiling to analyse the memory allocation behavior of an application. Unfortunately, it seems the profiling process itself is polluting my results. I continually see 80Mb being allocated over the timeframe of 5 minutes, which is due to memory profiling results being serialised over the JMXBean RMI connection. This memory is always in generation 1 and is immediately GC'd when I ask for it, but it is still annoying that this is showing up. Can I filter memory

VisualVM on Heroku (with Docker)

╄→尐↘猪︶ㄣ 提交于 2019-12-24 11:08:43
问题 I have a Dockerized Scala Play app that I deploy to Heroku through their container registry. There seems to be a small memory leak in it. I'd like to troubleshoot this by using VisualVM but I am not able to connect VisualVM to the app in Heroku. I have gone through these steps: I enabled the feature runtime-heroku-exec I installed the heroku-cli-java When I run heroku java:visualvm against my app, I get the following response: Establishing credentials... error ▸ Could not connect to dyno! ▸

JFreeChart heap space

蓝咒 提交于 2019-12-24 00:39:51
问题 I'm just wondering if there's a way to stop JFreeChart thrashing the heap, or an alternative that doesn't do it so much. SpreadsheetDate , Millisecond and Day are taking up about 70 MB of the heap, but the garbage collector is probably getting thrashed too. They are, collectively, the biggest users of heap space in my app. There's also TimeSeriesDataItem which uses 12 MB. This is with recording things every 200 milliseconds or so, for all charts. I'm also updating / storing a fair few

How can I find the local variables in Heap file

柔情痞子 提交于 2019-12-23 08:50:50
问题 I have a j2ee application and monitoring it by visualVM. Lets say that I have a method like this: public void doStuff(int param) { String s = getStringVariable(param); StringBuilder sb = new StringBuilder(); //Do stuff with sb object } From the thread tap, I can see that some of my threads stuck in the above method. So I have generated a heap dump file to figure out what is s and sb contains. But how can I do that? I am using Eclipse Memory Analyzer. 回答1: you can get the local variable's from

VisualVM OQL: how to search for primitive float values rather than actual Float instances?

随声附和 提交于 2019-12-23 01:25:17
问题 I am wondering how one can search for all primitive float values that match a certain number. When doing something like: select n from java.lang.Float n where n.value == 1.00 Only the Float class instances are being found. The application I am exploring is using different wrappers than just Float (eg. Vectors) that use primitive float values as fields for which I need to search. How would I accomplish this? The following returns a "float is not found error": select n from float n where n

Memory sampling with jvisualvm

一笑奈何 提交于 2019-12-22 11:24:01
问题 I am using memory sampling feature of Java Visual VM and I can't answer the questions: Why are there so many instances created? Why does these numbers of instances and bytes keep increasing? For instance, I created a very simple Java program as follow: public class TestMemory{ public static void main(String[] args) throws InterruptedException { System.out.println("Hello"); Thread.sleep(60 * 60 * 1000); } } And I can see in Java Visual VM that there are 611 classes. The number of instances

How to change the application name in VisualVM?

删除回忆录丶 提交于 2019-12-22 08:48:14
问题 How can i change the application name in VisualVM ? I have multiple applications that where started from my IDE, but it's hard to distinguish them, there name are equal and the only difference is the PID. So i want to give them meaningful names, but the menu-item "Rename.." is disabled. How can i rename the application ? It seems to me like rename is only possible on snapshots -> descripion of snapshots 回答1: Rename and Remove menu item are enabled only for snapshots not for applications. If

VisualVM breaks jetty

痞子三分冷 提交于 2019-12-22 08:17:12
问题 I'm trying to profile application that is run by "mvn jetty:run", when I connect VisualVM to it and click on Profile jetty crashes with: Profiler Agent: Waiting for connection on port 5140 (Protocol version: 8) Profiler Agent: Established local connection with the tool # # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6da5e5d4, pid=5124, tid=5704 # # JRE version: 6.0_16-b01 # Java VM: Java HotSpot(TM) Client VM (14.2-b01

java memory leak, visualvm showing wrong data

孤人 提交于 2019-12-22 06:29:43
问题 I've a java application running, after few hours it fulfills memory. I've tried to detect memory leak with visualvm but it shows wrong data (have no idea how that can happen). In the screenshot you can see task manager showing memory usage of 700Mb and visualvm showing 225... Does anyone know whats going on here? Regards 回答1: Beware that your OS is only aware of the total amount of memory java has reserved over the time (and java will not return that amount of memory easily AFAIK). However

jmx/jstatd access to remote machine through an ssh tunnel

夙愿已清 提交于 2019-12-22 01:58:34
问题 I'd like to use visualvm app through an ssh tunnel (to an EC2 machine) using jmx OR jstatd. How do I do this? Here is a list of what has been tried (and failed): (BTW: if visual vm is not appropriate, how do I find memory leaks on a remote machine?) jstatd: attempt: I set up the jstatd server on the EC2 machine (app was already running on it) Then I set up a tunnel mapping local port 3333 to remote port 1099 In VisualVM I tried to connect using jstatd on port 3333 ... none of the processes on