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
5
votes
1 answer

jvmti agent fatal error on linux: C [libc.so.6+0x7ae68] strcpy+0x18

I have written a jvmti agent to trace method invocations. I code it with C and jvmti and jni functions. Our os is Fedora 15 and the agent is compiled into a .so file. When I test it with a non-trivial java program, it crashes and gives the following…
dzy
  • 81
  • 1
  • 4
4
votes
2 answers

How to get the full command line in JVMTI?

Is it possible to get full command line with all arguments which was used to launch current Java process and to get that during OnLoad phase in JVMTI?
4
votes
3 answers

Profiling vs Instrumentation - Java

Basic question: JVM provides JVMTI which native API for profiling and debugging JVM. JVM instrumentation also does the same (is that correct?). If yes, what is difference between the both?
Sandeep Jindal
  • 14,510
  • 18
  • 83
  • 121
4
votes
0 answers

How to resolve this - E/StudioProfiler: JVMTI error: 103

The app runs but not as it should. The list of strings will not appear, but I can click the screen and it tries to show the peaches image, but only 1/2 of it... and the other three do not come to appear. E/StudioProfiler: JVMTI error: 103…
user11645497
4
votes
0 answers

JDWP Out of memory error from long running java server

I'm running a server with following command: java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8000 -server -jar -Dlog4j.configurationFile=properties/log4j2.xml myApp.jar The server is running on the AWS cloud (EC2 small…
hylowaker
  • 966
  • 2
  • 9
  • 24
4
votes
1 answer

Will breakpoints set via SetBreakpoint in JVMTI from one agent be visible to a remote debugger connected to the JVM?

Let's assume a remote debugger is connected to the local JVM. At some point if a JVMTI agent (other than the debugger one) sets a breakpoint via SetBreakpoint, will it be visible to the remote debugger? Will the remote debugger be able to step over…
eugen
  • 5,856
  • 2
  • 29
  • 26
4
votes
1 answer

JVMTI RetransformClasses() is taking a lot of time

I deployed a simple JVMTI agent to test bytecode instrumentation. My strategy is to call RetransformClasses function in CompiledMethodLoad call back to invoke ClassFileLoadHook. I wrote following code to do so: err =…
Saqib Ahmed
  • 1,056
  • 14
  • 33
4
votes
1 answer

How to properly write a SIGPROF handler that invokes AsyncGetCallTrace?

I am writing a short and simple profiler (in C), which is intended to print out stack traces for threads in various Java clients at regular intervals. I have to use the undocumented function AsyncGetCallTrace instead of GetStackTrace to minimize…
user400348
  • 236
  • 2
  • 7
4
votes
7 answers

How to detect Java agents, JVMTI, etc

How does one secure the Java environment when running on a machine you don't control? What is to stop someone from creating a java agent or native JVMTI agent and dumping bytecode or re-writing classes to bypass licensing and/or other security…
4
votes
4 answers

Identity Hashcode to Java Object

A friend of mine and I have the following bet going: It is possible to get the Object again from the memory by using the Identity Hashcode received for that Object using System.identityHashCode() in Java. With the restriction that it has not yet…
Rittel
  • 579
  • 5
  • 21
4
votes
1 answer

Using JDWP and JVMTI to obtain information of the running Java application

We are developing an application for obtaining the information of a running java application using JDWP and JVMTI. Sun Java comes with a reference implementation of JDWP so using agentlib -jdwp: will use the reference implementation. Our aim is to…
MohamedSanaulla
  • 6,112
  • 5
  • 28
  • 45
4
votes
4 answers

Is there such as role as a Java Runtime Administrator?

There are Database Administrators (DBA) and Unix|Windows System Administrators. There are likely soon to be Cloud Administrators. There are hordes of "administrators" who are tasked with administering and managing numerous large-system JVMs running…
Jé Queue
  • 10,359
  • 13
  • 53
  • 61
3
votes
1 answer

JVMTI - how to get the value of a method parameter from callback

I am recording all method entries from my Java app thanks to a JVMTI Agent. For now, I am able to get the name of each method, but I'd want to be able to get the value of the parameters that method received. This problem has already been discussed…
Max
  • 105
  • 1
  • 1
  • 4
3
votes
1 answer

How JVM collect ThreadDump underhood

Please explain how JVM collect ThreadDump underhood. I don't understand how it collectons stack traces of threads that are off-CPU (wait disk IO,Network,non-voluntary context switches). For example, linux perf collect info only about on-CPU…
srg321
  • 105
  • 7
3
votes
3 answers

Thread-aware heap allocation tracking with JVMTI

Writing a profiling I would also implement the typical task of heap profiling. Specifically I would like to track, which thread has allocated how much data? Using JVMTI I thought it's sufficient to hook to the events VM Object Allocation and Object…
Konrad Reiche
  • 27,743
  • 15
  • 106
  • 143
1 2
3
14 15