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) }'

trace openjdk from systemtap的更多相关文章

  1. Systemtap kernel.trace("*") events source code

    http://blog.163.com/digoal@126/blog/static/16387704020131014562216/

  2. How to trace a java-program

    up vote17down votefavorite 8 As a sysadmin I sometimes face situations, where a program behaves abno ...

  3. SystemTap知识(一)

    SystemTap是一个系统的跟踪探测工具.它能让用户来跟踪和研究计算机系统在底层的实现. 安装SystemTap需要为你的系统内核安装-devel,-debuginfo,-debuginfo-com ...

  4. 用systemtap对sysbench IO测试结果的分析1

    http://www.actionsky.com/docs/archives/171  2016年5月6日  黄炎 近期在一些简单的sysbench IO测试中, 遇到了一些不合常识的测试结果. 从结 ...

  5. systemtap 列出所有linux 内核模块与相关函数2

    [root@localhost src]# uname -aLinux localhost.localdomain 2.6.32 #1 SMP Sun Sep 20 18:58:21 PDT 2015 ...

  6. Linux 下的一个全新的性能测量和调式诊断工具 Systemtap, 第 3 部分: Systemtap

    Systemtap的原理,Systemtap与DTrace比较,以及安装要求和安装步骤本系列文章详细地介绍了一个Linux下的全新的调式.诊断和性能测量工具Systemtap和它所依赖的基础kprob ...

  7. 内核调试神器SystemTap — 更多功能与原理(三)

    a linux trace/probe tool. 官网:https://sourceware.org/systemtap/ 用户空间 SystemTap探测用户空间程序需要utrace的支持,3.5 ...

  8. 内核调试神器SystemTap — 探测点与语法(二)

    a linux trace/probe tool. 官网:https://sourceware.org/systemtap/ 探测点 SystemTap脚本主要是由探测点和探测点处理函数组成的,来看下 ...

  9. 内核调试神器SystemTap — 简介与使用(一)

    a linux trace/probe tool. 官网:https://sourceware.org/systemtap/ 简介 SystemTap是我目前所知的最强大的内核调试工具,有些家伙甚至说 ...

随机推荐

  1. 李洪强iOS开发Swift篇—01_简单介绍

    李洪强iOS开发Swift篇—01_简单介绍 一.简介 Swift是苹果于2014年WWDC(苹果开发者大会)发布的全新编程语言 Swift在天朝译为“雨燕”,是它的LOGO 是一只燕子,跟Objec ...

  2. windows进程中的内存结构(好多API,而且VC最聪明)

    在阅读本文之前,如果你连堆栈是什么多不知道的话,请先阅读文章后面的基础知识.   接触过编程的人都知道,高级语言都能通过变量名来访问内存中的数据.那么这些变量在内存中是如何存放的呢?程序又是如何使用这 ...

  3. Android Adapter的getViewTypeCount和getItemViewType

    Adapter的getViewTypeCount和getItemViewType 不同的项目布局(item layout) 我们再举一个稍微复杂的例子,在上例的list中加入一些分隔线 你需要做这些: ...

  4. Lua的function、closure和upvalue

    Lua中的函数是一阶类型值(first-class value),定义函数就象创建普通类型值一样(只不过函数类型值的数据主要是一条条指令而已),所以在函数体中仍然可以定义函数.假设函数f2定义在函数f ...

  5. 【CF】135 Div2 Choosing Capital for Treeland

    树形结构,挺有意思的题目.不难. /* 219D */ #include <iostream> #include <string> #include <map> # ...

  6. BZOJ_1798_&_Codevs_2216_[AHOI_2009]_行星序列_(线段树)

    描述 BZOJ: http://www.lydsy.com/JudgeOnline/problem.php?id=1798 Codevs: http://codevs.cn/problem/2216/ ...

  7. (转载)AS3领航系列教程 之 AS3程序的入口

    (转载)http://blog.csdn.net/wibrst/article/details/1861828 要实践本教程, 您需要安装以下软件:    Flash CS3 AS3程序的入口 众所周 ...

  8. Code generated using the T4 templates for Database First

    Error message: Code generated using the T4 templates for Database First and Model First development ...

  9. SQL语句 DML,DDL,DCL(转载)

    数据控制语言(DCL)是用来设置或者更改数据库用户或角色权限的语句,这些语句包括GRANT.DENY.REVOKE等语句,在默认状态下,只有 sysadmin.dbcreator.db_owner或d ...

  10. HDOJ/HDU 2163 Palindromes(判断回文串~)

    Problem Description Write a program to determine whether a word is a palindrome. A palindrome is a s ...