Date: Fri, 27 Mar 2015 09:59:56 +0300 From: Dmitry Samersoff <dsamersoff@gmail.com> To: Jung-uk Kim <jkim@FreeBSD.org>, Johannes Dieterich <dieterich.joh@gmail.com>, freebsd-java@freebsd.org Subject: Re: dtrace, jstack and lang/openjdk7 or 8 Message-ID: <5514FFEC.6010205@gmail.com> In-Reply-To: <55146F51.3030404@FreeBSD.org> References: <CABquGzWu7Y2v80D8EOfQ8QR9T_hCb9T9t6a%2BkjissxEsKbjLCA@mail.gmail.com> <55146F51.3030404@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jung-uk Kim, > BTW, 'jstack -m <pid>' is invalid command, i.e., it does not work with > a running process. You need to set '-F' option to force it. jstack -m turns on -F internally so command it self is OK. The problem is jstack -F uses serviceability agent (see hotspot/agent) as a backend and as far as I know this backend is not ported to FreeBSD - -Dmitry On 2015-03-26 23:42, Jung-uk Kim wrote: > On 03/25/2015 19:02, Johannes Dieterich wrote: > > Hi, > > > I am currently trying to get dtrace to work with either > > java/openjdk7 or java/openjdk8 (as per Brendan Gregg's howto: > > http://www.brendangregg.com/blog/2014-06-12/java-flame-graphs.html). > > > Unfortunately, I get exactly what he describes: I am missing > > everything inside the JVM. I suspect this has to do with jstack() > > not working. The bundled jstack executable (yes, I know that they > > are only vaguely related) also seems to work only so-so. Basically, > > I can get a working stack trace without a variable, with -l, but > > not with -m, and not with -F. It causes exceptions like this: > > > $ /usr/local/openjdk7/bin/jstack -m 84749 > ... > > So, what I am asking is: anybody out there got a working setup for > > dtrace+openjdk on FreeBSD? If so, it would be fantastic if you > > could post the necessary steps! > > jstack from java/openjdk8 works fine AFAICT. Unfortunately, dtrace is > unimplemented for FreeBSD. > > BTW, 'jstack -m <pid>' is invalid command, i.e., it does not work with > a running process. You need to set '-F' option to force it. > > % /usr/local/openjdk8/bin/jstack > Usage: > jstack [-l] <pid> > (to connect to running process) > jstack -F [-m] [-l] <pid> > (to connect to a hung process) > jstack [-m] [-l] <executable> <core> > (to connect to a core file) > jstack [-m] [-l] [server_id@]<remote server IP or hostname> > (to connect to a remote debug server) > > Options: > -F to force a thread dump. Use when jstack <pid> does not respond > (process is hung) > -m to print both java and native frames (mixed mode) > -l long listing. Prints additional information about locks > -h or -help to print this help message > > > Jung-uk Kim > _______________________________________________ > freebsd-java@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-java > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJVFP/sAAoJEHEy08c4gIABIKEH/iGdHwDoMOJJm5eW4Rbasmt/ yFd5HuEXaCDwXGPI7cDlmXDeUZxBEUwy+S9611e9jFRwiS5NuQzYnrpuIZ4d+QQC gP9gCbFvEi8vac34NCt2urar3zfJNgjs3X5A/4cMN6ZpE/NlbNAPEZw/sKbYxij1 rFWxYdqH8zFD2Fcabcs0DQEFFYO2O8B0L7DrvUU0k2sZu/hhkNopp812eNL1ZDWn qFWG8RdBMKOKCZ74FHzjkR8quTzfTDfDC5ijI3lYFUkCTYX5z73zOAOK69de2v+p xefQSvI84/IIZhQJbvgFG9Oe3MtrS5A3thCB4sm2mkukJIB4zS6gPQyebvrvOAw= =IfYl -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5514FFEC.6010205>