Comments (5)
I see. Thanks.
But the regex fix needs to be a bit more generic in order to cope with C++ symbols and c++filt
(ie, when doing perf script | c++filt | gprof2dot.py -f perf
as recommended in the README. Because demangled C++ symbols can have space and +
.
Either we use non-greedy regex for the symbol (to avoid consume +0x....), or we leave this regex as is, and strip trailing offsets with a seperate regex..
from gprof2dot.
Another alternative is to replace the instructions to not invoke c++filt
, and instead invoke c++filt
internally.
from gprof2dot.
c++filt may be redundant. From perf script man page:
--demangle
Demangle symbol names to human readable form. It's enabled by
default, disable with --no-demangle.
With the attached example, perf script by default demangles operator+ and produces output like this:
62a operator++0xffffffffff800004 (/home/mumble/tmp/gprofc++/example)
perf script --no-demangle followed by c++filt instead produces output like
this:
627 operator+(Blivet, Blivet)+0xffffffffff800001 (/home/mumble/tmp/gprofc++/example)
The attached revised patch does a non-clever, after-the-fact amputation of the address that handles both cases correctly.
gprof2dot-patchv2.txt
examplecc.txt
from gprof2dot.
Oops. Don't crash if function_name is None.
from gprof2dot.
Finally pushed the fix. Thanks.
from gprof2dot.
Related Issues (20)
- Produce graph from union of two roots? HOT 1
- Unclean error when trying to pass invalid parameters HOT 1
- main missing HOT 3
- Add units to timings in node labels HOT 4
- Visualization results are abnormal HOT 3
- Output helpful message when loading python2 pstats fails
- How to use --path option HOT 2
- how can i use gprof2dot on a binary executable file with a config file? HOT 1
- gprof get empty gmon.out? HOT 1
- Compiling errors when using the command HOT 1
- AttributeError: 'ellipsis' object has no attribute 'items' HOT 1
- Analysis of test cases HOT 1
- Gprof2Dot can't parse my prof file :/ HOT 2
- valgrind: A lot of information is lost, graph has few disconnected components HOT 6
- Allow to show the full-path of the functions HOT 1
- Not working with graphviz 2.50.0? HOT 1
- Q: How to show absolute time in graph from Linux perf? HOT 4
- Please push a new release to PyPI HOT 1
- Static analyze problem HOT 1
- RFE: please start making github releases HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gprof2dot.