Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: tools/mac-nm

Issue 2696903002: [profiler] Graphical front-end for tick processor. (Closed)
Patch Set: Fix test Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/codemap.js ('k') | tools/profile.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/sh 1 #!/bin/sh
2 2
3 # This script is a wrapper for OS X nm(1) tool. nm(1) perform C++ function 3 # This script is a wrapper for OS X nm(1) tool. nm(1) perform C++ function
4 # names demangling, so we're piping its output to c++filt(1) tool which does it. 4 # names demangling, so we're piping its output to c++filt(1) tool which does it.
5 # But c++filt(1) comes with XCode (as a part of GNU binutils), so it doesn't 5 # But c++filt(1) comes with XCode (as a part of GNU binutils), so it doesn't
6 # guaranteed to exist on a system. 6 # guaranteed to exist on a system.
7 # 7 #
8 # An alternative approach is to perform demangling in tick processor, but 8 # An alternative approach is to perform demangling in tick processor, but
9 # for GNU C++ ABI this is a complex process (see cp-demangle.c sources), and 9 # for GNU C++ ABI this is a complex process (see cp-demangle.c sources), and
10 # can't be done partially, because term boundaries are plain text symbols, such 10 # can't be done partially, because term boundaries are plain text symbols, such
11 # as 'N', 'E', so one can't just do a search through a function name, it really 11 # as 'N', 'E', so one can't just do a search through a function name, it really
12 # needs to be parsed, which requires a lot of knowledge to be coded in. 12 # needs to be parsed, which requires a lot of knowledge to be coded in.
13 13
14 if [ "`which c++filt`" == "" ]; then 14 if [ "`which c++filt`" == "" ]; then
15 nm "$@" 15 nm "$@"
16 else 16 else
17 nm "$@" | c++filt -p -i 17 nm "$@" | sed -n "s/\([0-9a-fA-F]\{8,16\}\) [iItT] \(.*\)/\\1 \\2/p"\
18 | c++filt -p -i
18 fi 19 fi
OLDNEW
« no previous file with comments | « tools/codemap.js ('k') | tools/profile.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698