Using BTrace with JRE as a target VM

  1 post   Feedicon  
Replies: 0 - Last Post: July 04, 2011 07:12
by: Jaroslav Bachorik
showing 1 - 1 of 1
 
Posted: July 04, 2011 07:12 by Jaroslav Bachorik
Thanks to Artiom Gourevitch there is a quick how-to for running BTrace on JRE.

  1. Copy tools.jar from jdk to a convenient place (Ex. /tmp)
  2. Copy libattach.so from jdk to a convenient place (Ex. /tmp) - this file depends on OS type - 32 or 64 bits
  3. Change btrace script - change TOOLS_JAR="${JAVA_HOME}/lib/tools.jar" to point to the tools.jar
  4. Change btrace script - change java execution line (i.e. line that starts with $JAVA_HOME}/bin/java ) add parameter -Djava.library.path=/tmp where /tmp is the folder that contains libattach.so file.
  5. Run the script with by the same user that target application is run by.


Although the guide is for Linux it should work for other OSs too, given that you change the OS specific parts accordingly (paths, env vars names, library extensions etc.)
Replies: 0 - Last Post: July 04, 2011 07:12
by: Jaroslav Bachorik
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120518.3c65429)
 
 
Close
loading
Please Confirm
Close