Skip to content

Instantly share code, notes, and snippets.

@CrazyPython CrazyPython/logs
Last active Jun 29, 2016

What would you like to do?
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.5.0
Thread model: posix
InstalledDir: /Applications/
"/Applications/" -cc1 -triple x86_64-apple-macosx10.11.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -disable-free -disable-llvm-verifier -main-file-name scratch.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 264.3.102 -v -dwarf-column-info -debug-info-kind=standalone -dwarf-version=2 -femit-coverage-notes -femit-coverage-data -resource-dir /Applications/ -stdlib=libc++ -O2 -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /redacted/file/path -ferror-limit 19 -fmessage-length 199 -stack-protector 1 -fblocks -fobjc-runtime=macosx-10.11.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o /var/folders/20/vmhb03n16xx2897_49c6_zz80000gn/T/scratch-e39169.o -x c++ scratch.cpp
clang -cc1 version 7.3.0 (clang-703.0.31) default target x86_64-apple-darwin15.5.0
ignoring nonexistent directory "/usr/include/c++/v1"
#include "..." search starts here:
#include <...> search starts here:
/System/Library/Frameworks (framework directory)
/Library/Frameworks (framework directory)
End of search list.
"/Applications/" -demangle -dynamic -arch x86_64 -macosx_version_min 10.11.0 -o ./.executables/profiler/scratch /var/folders/20/vmhb03n16xx2897_49c6_zz80000gn/T/scratch-e39169.o -lprofiler /Applications/ -lc++ /Applications/ -lSystem /Applications/
"/Applications/" -o ./.executables/profiler/scratch.dSYM ./.executables/profiler/scratch
#!/usr/bin/env bash
# build the program with profiling support (-gp)
g++ -std=c++11 $1 -o ./.executables/profiler/$(basename $1 .cpp) -v -g -O -fprofile-arcs -ftest-coverage -lprofiler
echo "Finished compiling + linking"
CPUPROFILE=$1.out ./.executables/profiler/$(basename $1 .cpp)
# run the program; generates the profiling data file (gmon.out)
./.executables/profiler/$(basename $1 .cpp)
pprof --text $1.out ./.executables/profiler/$(basename $1 .cpp)
# valgrind --tool=callgrind
# callgrind_annotate
# echo ""
# cat $1.gcov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.