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.
weblist output disassembly now contains inlined source. (#235)
weblist output disassembly now contains inlined source.
In addition, fixed the line number assigned to instructions from inlined calls.
As an illustration, see the before and after output for a "pprof -weblist" command for a simple function:
[before](https://ghemawat.github.io/scratch/tmp/list1.html)
[after](https://ghemawat.github.io/scratch/tmp/list2.html)
Note that in the "before" page, the 7.26 second line cannot be expanded, but in the "after" page clicking on it reveals a wealth of information.
* Add support for tag units
Updated tests for adding tag units
* updated proto docs to describe tag units
* fixed formatting
* added additional test
* require specific units for graph tag to be recognixed
* updated tests and formatting
* Fixed formatting
* Fixed style error
* modify proto_test to be sure tag units not overwritten
* Clarified label docs
* call legacy profile memory allocations size, not byte
* updated tests to call bytes tags in legacy profile size
* Revert "updated tests to call bytes tags in legacy profile size"
This reverts commit 9289378af2.
* Revert "call legacy profile memory allocations size, not byte"
This reverts commit 6b18973562.
* Updated so units not modified when profile written out
* Fixed formatting errors
* Removed field for inferred numeric label units from profile
* Modified profile String() output
* fixed formatting error
* changed name of function used to identify units for numeric labels
* Refactor String() for profile
* Modified for clarity and address comments
* renamed function for clarity
* Made numeric label units field seperate in profile
* Modified test
* Refactored identifyNumLabelUnits()
* Updated comments
* Fixed formatting error
* Addressed comments
* Fixed style error
* clarify comment
* Refactored to address comments
* addressed comments
* addressed comments
* addressed comments
* Make binutils thread safe.
binutils is now used from multiple goroutines when the
web interface is enabled (since http server spins up a new
goroutine for each request). Added appropriate synchronization
to various objects in binutils to provide the appropriate
thread-safety.
In addition, added a bunch of tests:
. Test parsing of nm output.
. Tests for Binutils methods.
. Test llvm-symbolizer interface (using an llvm-symbolizer emulator).
* Fix go vet errors about unkeyed literals.
* copy stderr to figure out test failures
* Make shell script portable.
* Update comments to match new var name.
* Give a name to the embedded Mutex field in addr2Liner.
Replaced http wrapper field in plugin Options with HTTPServer. (#229)
Replaced http wrapper field in plugin Options with HTTPServer.
HTTPServer allows somebody embedding pprof to control how the
hosting HTTP server is constructed which makes pprof work in
more environments.
Previously, web interface was assuming that the ith node in
the dot graph was being assigned the id "node<i+1>". However,
this assumption was invalid when extra nodes were inserted
into the dot output (e.g., nodelets added for allocation
profiles). Because of this bug, node selection by clicking
in the webui graph output would sometimes pick a random
string to match against.
The problem is now fixed by manually assigning an id to
every node in the generated dot graph. dot will propagate
this id reliably to the svg output.
Updated the golden tests to reflect the new dot output.
Extended dotgraph_test.go with an -update flag that can be
used to update golden files. Also removed a bunch of code
duplication in the test.
* Make top table sortable.
* Recompute Sum% column contents after sorting.
* Cleanups identified during review.
* Simplify top table sorting by generating it in Javascript.
* Change menu buttons to links.
This allows right-click/middle-click etc. to work properly.
* Clean up javascript in response to review comments.
Also fix error in handling of Enter key.
* Simplify regular expression construction from selection.
Use common header for remaining web views (source code, disassembly, peek) (#214)
Use common header for remaining web views (source code, disassembly, peek).
Details:
* Made it easier to reuse css, javascript, etc. across views.
* Added two new templates: sourcelisting, plaintext.
* Use new templates for showing source code, disassembly, peek.
* Merged Functions menu into View menu.
* View change menu entries are now always enabled.
* Removed now unused "newWindow" argument to navigate.
* Removed redundancy in web handlers.
* Renamed /weblist URL to /source.
* Assembly and source code listings are now limited to 500 functions
sorted by decreasing flat value (to prevent huge delays when
selecting asm/source view across the entire profile).
Stop treating -symbolize=force as the default (#210)
* Stop treating -symbolize=force as the default
The code parsing symbolize options was treating the empty option as
"force", effectively making -symbolize=force the default. This would
unnecessarily symbolize profiles that were already symbolized.
* Add more testing for symbolize option parsing
Do all parsing of symbolize options on a single function and
do more thorough testing of it.
* Have symbolz honor -force
Currently -symbolize=remote will force remote symbolization of mappings
that already had mappings. Making that depend on an explicit
-symbolize=force to make it consistent with local symbolization.
* Applied fixes from latest review iteration
* Add comment on symbolz check for resymbolization
* Reformatting comment
Extend web UI to contain a tabular "top" display (#194)
* Split template into multiple defined templates for ease of sharing.
* Add a menu bar at the top and tie all buttons to it.
* Add top view.
* Handle top table clicks.
* Handle regexp based selection of top entries.
* Added test for /top view.
* Reduced code duplication between / and /top handlers.
* Add Refine menu to Top view as well.
Details:
* Pass base URL to web page.
* Use base URL in navigate() to stay in same view.
* Change Reset to stay in same view.
* Handled review comments + increased top display from 50 to 500 rows:
* Moved "inline" indicator to separate column of top display.
* Moved "Reset" button to "Refine" menu.
* Simplified some Javascript.
* Handle all meta characters in quotemeta.
* Removed unnecessary css "display: inline" from closedetails.
Signed-off-by: Sanjay Ghemawat <sanjay@alum.mit.edu>
* Modified variable type to have []string value
* added repeatableStringKind
* modify repeatableStringKind to actually handle multiple values
* Modify applyFocus to work with multiple values for tagfocus/tagignore
* Modify applyFocus to work with multiple values for tagfocus/tagignore
* Modified CompileTagFilter to handle tag filters of the form -tagfocus=key1=val1
* Modified StringList
* add testing for compileTagFilter
* fixed typo
* fixed code style error
* Revert "fixed code style error"
This reverts commit 0b1826c163.
* Revert "fixed typo"
This reverts commit 2593652bd0.
* Revert "add testing for compileTagFilter"
This reverts commit 152d7b0363.
* Revert "Modified StringList"
This reverts commit b57d35a762.
* Revert "Modified CompileTagFilter to handle tag filters of the form -tagfocus=key1=val1"
This reverts commit ebe1e344bf.
* Revert "Modify applyFocus to work with multiple values for tagfocus/tagignore"
This reverts commit 3b62091b67.
* Revert "Modify applyFocus to work with multiple values for tagfocus/tagignore"
This reverts commit 7172159cd3.
* Revert "modify repeatableStringKind to actually handle multiple values"
This reverts commit abb1e3ec4b.
* Revert "added repeatableStringKind"
This reverts commit 8b8e4e76fc.
* Revert "Modified variable type to have []string value"
This reverts commit 5f213dc4d1.
* added support for filtering by specific tags
* Fixed formatting problems
* Updated variable name for clarity
* Added test cases for tag filtering
* Update tagfocus and tagignore description
* Fixed formatting error
* Updated docs to explain new tag filtering
* Updated docs to clarify tag filtering
* Updated docs to clarify tag filtering
* Updated docs and help comments for tag filtering
* Updated docs for tag filtering
* Update pprof docs for tag filtering
* Update tagfocus and tagignore help descriptions
* Update tagfocus and tagignore descriptions in docs
* Update tagfocus and tagignore descriptions in docs and help
* Updated tagfocus and tagignore descriptions in docs; added TODO for regexp matching
* Updated tagfocus and tagignore descriptions in docs
* Modified docs fo tagfocus for clarity
profile: FilterSamplesByName returns the correct hnm (#190)
FilterSamplesByName should return true for hnm only when
"at least one sample" matched the show regexp.
Before this commit it always returned true
if the show regexp is not nil and p.Location is not empty.