Questions tagged [jvmti]

JVMTI is the Java Virtual Machine Tool Interface, a native API by which authors can write JVM plugins to monitor or modify the execution of a Java Virtual Machine.

Documentation for the current JVMTI 1.2. Home page for JVMTI in JDK 7.

JVMTI was introduced in JDK 5. It replaces Java Virtual Machine Profiler Interface (JVMPI) and the Java Virtual Machine Debug Interface (JVMDI).

214 questions
1
vote
1 answer

How to get Object ID as used in Heap Dump

I would like to be able to get the same ID that is being used in Java heap dumps (created via jmap or JMX, etc). This is to be able to identify the live object at the still running application versus an older memory snapshot (the heap dump) of the…
Haasip Satang
  • 457
  • 3
  • 17
1
vote
1 answer

JVMTI: FollowReferences : how to skip Soft/Weak/Phantom references?

I am writing a small code to detect number of objects left behind after certain actions in our tool. This uses FollowReferences() from JVMTI API. This counts instances reachable by all paths. How can I skip paths that included weak/soft/phantom…
Jayan
  • 18,003
  • 15
  • 89
  • 143
1
vote
1 answer

Overhead of enabling JVMTI *capability* to query local variables

I'm working on a simple dynamic language that runs on the JVM. One of the required capabilities is this: only when an exception is thrown, I need to be able to query the local variables for all frames in the call stack at the time the exception is…
0xbe5077ed
  • 4,565
  • 6
  • 35
  • 77
1
vote
1 answer

what happens if there are two or more different implementations of jre on same platform?

I have two jre versions installed on my system (1.3 & 1.5) and i am trying to some java applet programs through internet explorer. All i wanted to know is that how will the web browser select which version of jre to use when the applet program is…
Kratos
  • 185
  • 1
  • 4
  • 18
1
vote
0 answers

python debugger interface for native code?

Is there any way to write debugging tools for Python that run in-process similar to the JVM Tool Interface APIs? It seems like all the Python debuggers I've run across are actually implemented through Python's introspection utilities (ie the…
Dan
  • 7,155
  • 2
  • 29
  • 54
1
vote
2 answers

Finding which code allocated large objects in Sun JVM

Is there a feature like Finding which methods allocated large objects for Sun JAVA? -Xdump:stack:events=allocation,filter=#1k or -Xdump:stack:events=allocation,filter=#2m..4m
Martin
  • 1,385
  • 15
  • 21
1
vote
1 answer

jvmti: how to use class_tag

I am looking at the JVMTI API(http://docs.oracle.com/javase/6/docs/platform/jvmti/jvmti.html) in order to get the current heap at a given state. In order to do this, I would like to use the FollowReferences…
Piervit
  • 11
  • 2
1
vote
1 answer

To calculate cpu usage using JVMTI

I'm looking to find the CPU usage of my java application. I found the best way to get CPU usage is (process_time/elapsed_time)*100.0. For a java application, the process_time is got by com.sun.management.OperatingSystemMXBean. Is there a way to…
Raj
  • 440
  • 2
  • 6
  • 22
1
vote
0 answers

jvmti and Spring AOP conflict

Background: I'm doing something to encrypt Java .class file, and using jvmti agentlib to decrypt the source data when the .class file is loaded. It's working when I do this for Java SE. But some exceptions are thrown when I do this for a java web…
ger_scau
  • 11
  • 3
1
vote
1 answer

Using System.load vs library set as agent

I made a simple library for measuring the size of a given object. The library is accessed through JNI from a Java class. It's specifically designed for Hotspot, thus it uses the JVMTI and it calls GetObjectSize. My question is, what's the better…
Paul
  • 63
  • 7
0
votes
1 answer

JVMTI not loaded

I'm trying to use the JVMTI in order to write a little Java debugger in C++. I read here: http://java.sun.com/developer/technicalArticles/Programming/jvmti/ that the JVM should call an exported method defined like JNIEXPORT jint JNICALL…
Idov
  • 5,006
  • 17
  • 69
  • 106
0
votes
1 answer

JVMTI tips and tricks

what i want to do is to combine the power of quartz with jvmti. basically, my plan is to use jvmti to monitor memory usage and base on that i will launch / execute process on que depending on its priority using quartz. i want each process to be done…
kowdphreak
  • 21
  • 2
0
votes
1 answer

How to run Jcalltracer

Hey guys I'm having trouble opening jcalltracer, an open source program on sourceforge that reverse engineers a Java program into sequence diagram. I got error when I was trying to add the following to JVM - java…
James Riden
  • 101
  • 1
  • 9
0
votes
0 answers

How to load a Java agent at runtime using C++

I want to load a Java agent at runtime without Restarting the JVM I know that I can load the agent with the -javaagent argument when starting the JVM but I want to do it at runtime. I found out that is possible using Sun tools but when I tried to do…
NightmareXD
  • 425
  • 1
  • 4
  • 14
0
votes
0 answers

How to access and change a java local variable with JVMTI and JNI

I am reading the JVMTI docs that give information on Local Variables. It said this: jvmtiError SetLocalFloat(jvmtiEnv* env, jthread thread, jint depth, jint slot, jfloat value) How do I obtain the said method parameters? Thanks for any help given. I…