Update perf_to_profile cli arguments to use flags. (#277) (#332)
Update perf_to_profile cli arguments to use flags. (#277)
Fixes #277
As perf_to_profile uses flags to parse its arguments, modify the call to perf_to_profile to use flags. Also pass the '-f' flag to overwrite the existing output profile file.
Redirect perf_to_profile's stdout/stderr to pprof's stdout/stderr.
Set base address on OSX.
This fixes issue #311. The mapped address of libraries was never considered, nor was the load address of the segments. It also fixes a couple of issues in binutils.go, such as when the tail of the data wasn't handled right when grouping symbols at the same address.
Pass text segment info to GetBase to handle Linux kernel ASLR case. (#299)
When pprof symbolizes kernel addresses in vmlinux binary for a profile
converted using https://github.com/google/perf_data_converter, the
addresses need to be adjusted if kernel ASLR is in effect. So far the
call to GetBase did not pass text segment info to GetBase which
shortcircuited the code to merely return zero adjustment. This change
fixes the call to GetBase to address that.
The added test case is a simulation of what happens with vmlinux, but it
should be pretty close. Including a vmlinux file into the test data does
not appear practical due to the binary size. I verified that the test
failed before the fix and passes after.
Note that the fixed issue is specific to the kernel ASLR as user-mode
ASRL-enabled binaries (i.e. built with -pie / -fpie) have ET_DYN type
which takes a different code path in GetBase which did not have issues
before this fix in practice.
internal/driver: fix new unkeyed composite lit vet warnings (#298)
The current version of go vet does not flag these as noted in
golang/go#23539. A fix is in the works, and will likely be included in
Go 1.11. Make the updated vet tool happy, so that the vendored copy of
pprof in the Go tree can be updated and make the vet trybot happy.
Fixes #297.
* Support parsing of is_folded bit
* Include folded bit lin (*Location).string() and in profile mergining
* address comments
* Set IsFolded to false during symbolization when Line is reset
* simplify tests
internal/driver: ignore temp dir error on Android (#295)
On an instance of the Android emulator running x86_64, $HOME points
to / which is not writable. Add Android to the list of GOOS where
the temp dir error is skipped.
Fixes the android/amd64 and android/386 builders on build.golang.org.
Keep refine menu enabled for views other than graph. (#286)
Pull request #263 disabled the refine menu for any views other than
Graph, but that's not expected - it's perfectly fine to use it for Flame
and Top, so just keep it enabled.
Fixes #285.
Update svgpan, add license, separate pprof-specific code. (#284)
The third_party svg directory has been a mix of pprof-specific code and
svgpan itself. This change moves the pprof-specific code out and adds a
license file. It also updates svgpan to 1.2.2 from
https://github.com/aleofreddi/svgpan while we are here. It also renames
the directory to svgpan to have all directories under third_party be
named precisely over the third party package they hold.
Update the web user interface aesthetically (#263)
Update the web user interface aesthetically.
The Refine menu is greyed-out for pages besides the Graph.
The description box now opens upon clicking the filename in the top-right.
* Handle "listen hungup" error on Plan 9 in TestHttpsInsecure
Plan 9 returns the "listen hungup" error when closing a closed listener.
See https://github.com/0intro/plan9/blob/4225c3e/sys/src/9/ip/devip.c#L476
Fixes #253.
* Handle empty profile on Plan 9 in TestHttpsInsecure
CPU profiling isn't implemented on Plan 9.
See golang.org/issues/22564.
Fixes #253.
* Show menu on click, not hover.
Previously, users had to be careful to not move the mouse
outside the menu (otherwise it would disappear unintentionally).
Also fixed a minor bug where we were not overwriting URL
parameters correctly when no selection was made.
* Use vendor prefixes for user-select.