Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Jan 2011 22:08:30 -0500
From:      Ryan Stone <rysto32@gmail.com>
To:        Steve Kargl <sgk@troutmask.apl.washington.edu>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Profiling code execution on amd64?
Message-ID:  <AANLkTi=C4L9fn7q8PfJgY=8c24BQnZTC9s7BubsrUYxv@mail.gmail.com>
In-Reply-To: <20110113171139.GA32250@troutmask.apl.washington.edu>
References:  <20110113171139.GA32250@troutmask.apl.washington.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
I would suggest using hwpmc for profiling:

# kldload hwpmc
# pmcstat -S unhalted-cycles -O /tmp/samples.out ../penetration
# pmcstat -R /tmp/samples.out -G /tmp/penetration.txt


You can also get pmcstat to generate gprof-compatible output with -g,
but I never use the mode so I'm really not sure what it gives you.  I
think that you have to run gprof on the output or something, but don't
hold me to that.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=C4L9fn7q8PfJgY=8c24BQnZTC9s7BubsrUYxv>