博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
trace openjdk from systemtap
阅读量:4602 次
发布时间:2019-06-09

本文共 1475 字,大约阅读时间需要 4 分钟。

here are several different tactics to trace openjdk from systemtap.

The first relies on sys/sdt.h dtrace-style markers compiled into the JVM, but not dbgsym data:

% stap -L 'process("/usr/lib/jvm/java*/jre/lib/*/server/libjvm.so").mark("*")'

If this shows an empty result, (and if I have the ubuntu libjvm.so path right), then this suggests your openjdk was compiled without the sys/sdt.h stuff, so this option is closed to you. If it shows a lovely list, you can use those .mark probes directly, or snarf/adapt a copy of the hotspot*.stp tapset sources from anywhere and transcribe it into your .stp file, or let stap find it via

% stap -I PATH ...

The second method relies on dwarf debuginfo compiled into the JVM, for which the dbgsym* stuff should be handy. If that is installed properly,

% stap -L 'process("/usr/lib/jvm/java*/jre/lib/*/server/libjvm.so").function("*")'

should show a gajillion functions. You may not have the benefit of tapsets, but with clever choice of functions, you should be able to get some decent tracing going.

The third method relies on byteman to do intra-JVM self-instrumentation under systemtap control. This requires no java dbgsym, but does require byteman and a bunch of auxiliary stuff. If this is available and compiled into the ubuntu systemtap, then something like:

% stap -e 'probe java("org.my.MyApp").class("^java.lang.Object").method("foo(int)")           { println($$parms) }'

转载于:https://www.cnblogs.com/zengkefu/p/5632780.html

你可能感兴趣的文章
根据屏幕高度自适应元素高度
查看>>
jQuery CSS 操作函数
查看>>
java配置环境变量
查看>>
TexturePacker 命令行用例
查看>>
list-style-type:decimal在IE中显示全是1的解析
查看>>
js保留整数
查看>>
.Net托管世界的应用程序域和线程-网摘
查看>>
大规模web服务读书笔记
查看>>
bzoj1112 [POI2008]砖块Klo
查看>>
解决form提交时又弹出页面的问题
查看>>
tmux 基础教程
查看>>
7.24 小结
查看>>
第二十七篇 名称空间与作用域
查看>>
Django打造在线教育平台_day_4: 页面(首页、登录)配置与登录功能实现
查看>>
日期时间选择器:datetimepicker
查看>>
WinForm 窗体
查看>>
Android ProgressDialog的使用
查看>>
类之间的关系练习1
查看>>
Oracle&JDBC&Hibernate知识总结
查看>>
JQuery系统梳理
查看>>