From owner-freebsd-bugs@FreeBSD.ORG Thu Mar 5 05:48:22 2015 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A667613B; Thu, 5 Mar 2015 05:48:22 +0000 (UTC) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 865BFEB1; Thu, 5 Mar 2015 05:48:22 +0000 (UTC) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPSA id 22C7BD22EC; Wed, 4 Mar 2015 21:48:16 -0800 (PST) Date: Wed, 4 Mar 2015 21:48:16 -0800 From: hiren panchasara To: bugzilla-noreply@freebsd.org Subject: Re: [Bug 198148] [hwpmc] pmcstat -G doesn't resolve symbols from userland processes Message-ID: <20150305054816.GB88380@strugglingcoder.info> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="mxv5cy4qt+RJ9ypb" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-bugs@FreeBSD.org X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 05:48:22 -0000 --mxv5cy4qt+RJ9ypb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 03/02/15 at 01:47P, bugzilla-noreply@freebsd.org wrote: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D198148 >=20 > Bug ID: 198148 > Summary: [hwpmc] pmcstat -G doesn't resolve symbols from > userland processes > Product: Base System > Version: 11.0-CURRENT > Hardware: Any > OS: Any > Status: New > Severity: Affects Only Me > Priority: --- > Component: kern > Assignee: freebsd-bugs@FreeBSD.org > Reporter: adrian@freebsd.org >=20 > pmcstat -G doesn't seem to resolve symbols from userland processes correc= tly or > reliably. In almost every instance, running pmcstat -G on a log file just > plainly doesn't resolve anything that isn't a kernel symbol. >=20 > To reproduce: >=20 > * run some very CPU busy process with lots of threads and syscalls; > * run pmcstat -O to record events to a logfile; > * when you're done, try using pmcstat -R -G to spit out the callgr= aph to > stdout. >=20 > Even if all of the events are process-spec, I see /just/ kernel events. >=20 > This happens on both -HEAD and -10. On -HEAD (r278050M), I do see non-kernel events.=20 # pmcstat -S instructions -O /var/tmp/sample # pmcstat -R /var/tmp/sample -G /var/tmp/sample.callgraph In sample.callgraph, I see things like 00.24% [1] sqlite3_column_bytes @ /usr/local/lib/libsqlite3.so.0.= 8.6 100.0% [1] 0xdb799d @ /usr/local/lib/firefox/libxul.so 00.24% [1] unixShmLock @ /usr/local/lib/libsqlite3.so.0.8.6 100.0% [1] walTryBeginRead 100.0% [1] sqlite3PagerSharedLock 100.0% [1] sqlite3BtreeBeginTrans 100.0% [1] sqlite3VdbeExec 100.0% [1] sqlite3_step 100.0% [1] 0xdb06b1 @ /usr/local/lib/firefox/libxul.so 00.24% [1] copy_boxes @ /usr/local/lib/libcairo.so.2.11200.18 100.0% [1] clip_and_composite_boxes 100.0% [1] _cairo_traps_compositor_paint 100.0% [1] _cairo_compositor_paint 100.0% [1] _cairo_surface_paint 100.0% [1] _cairo_gstate_paint 100.0% [1] _cairo_default_context_paint_with_alpha 100.0% [1] cairo_paint_with_alpha 100.0% [1] 0xf540c6 @ /usr/local/lib/firefox/libx= ul.so Am I understanding this correctly? cheers, Hiren --mxv5cy4qt+RJ9ypb Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJU9+4fXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/l8ZkH/ibR9xcPoy/klS84asqjt9Gx +iYtP69nna/F+Zyu00C9r2hj+nYnRtkXsYVlqSY2geEYkOLsmUs7kcqhcdY4KCDF Alz4j6Lo/g9AFmaaahteFSdLvpDazgEkl7spBs83KwKHLxVdTCgCQEhS5WEJUWH+ QaAHQW1+YdVtUPJqWQELYJy6YS/+1kg3AfXZpRco+bg/+PwmGUobqJijnQ7Ljji2 Be7JcYkWvu0dVJyJuCddzgrZRo3BRr3ID5+cjvZBFaagXwGjscT4+a2PsdX/5lPx lvYmMQJt2SvyKkklVTlSeVdgjfcSQiUhUNUztKgYTkgIb8lnlz0yZI9MhWyFP5o= =wLry -----END PGP SIGNATURE----- --mxv5cy4qt+RJ9ypb--