From owner-freebsd-java@FreeBSD.ORG Fri Mar 27 07:00:00 2015 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3821D2AB; Fri, 27 Mar 2015 07:00:00 +0000 (UTC) Received: from mail-la0-x22d.google.com (mail-la0-x22d.google.com [IPv6:2a00:1450:4010:c03::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9B825DBC; Fri, 27 Mar 2015 06:59:59 +0000 (UTC) Received: by lagg8 with SMTP id g8so63420867lag.1; Thu, 26 Mar 2015 23:59:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=tLu6VQCZLeFwvLacD3BH53PxFZaEAkxgMu4XI6N15JA=; b=IbN/VWWAihAV/ajC14wGYt7ZgESnNdNSi683TuTFQl6njcTYRRStADCIvsYOHumv6d G4e+DatpnjTFoH4Gu/ORcPgXKt3DYzrCYN+Jd/+LE8NMa+tqJ2qierf5QqAs94aX/Nge guiElAel2w+5b+OGGF/Q8JgDLdP7RLyE3ZG5FKfq2ULEGKhFE01GYVBPFe/gHqX9vyL1 m7QDSqpNzpgoTfFD71SsObOGk0VCQVisDphvOG/AdVqHblciMql6YDGkD+Ho4unP/tFR pXvm/pVGsChQ4XC0AfvyAIoG61HehYMh61oB8bRQ7NwfrVrbK13CYu4JLmVSchUjh823 cZcA== X-Received: by 10.152.3.196 with SMTP id e4mr16801460lae.40.1427439597478; Thu, 26 Mar 2015 23:59:57 -0700 (PDT) Received: from [192.168.0.77] (mircat.net. [81.9.105.50]) by mx.google.com with ESMTPSA id w9sm175692lae.35.2015.03.26.23.59.56 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Mar 2015 23:59:56 -0700 (PDT) Message-ID: <5514FFEC.6010205@gmail.com> Date: Fri, 27 Mar 2015 09:59:56 +0300 From: Dmitry Samersoff User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Jung-uk Kim , Johannes Dieterich , freebsd-java@freebsd.org Subject: Re: dtrace, jstack and lang/openjdk7 or 8 References: <55146F51.3030404@FreeBSD.org> In-Reply-To: <55146F51.3030404@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 07:00:00 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jung-uk Kim, > BTW, 'jstack -m ' 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 ' 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] > (to connect to running process) > jstack -F [-m] [-l] > (to connect to a hung process) > jstack [-m] [-l] > (to connect to a core file) > jstack [-m] [-l] [server_id@] > (to connect to a remote debug server) > > Options: > -F to force a thread dump. Use when jstack 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-----