Tim Holy
unread,Jan 3, 2016, 8:47:54 PM1/3/16Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to julia-dev
Does anyone have experience with profiling julia's C code? The built-in profiler
collects information about ccalls, but we can't handle the instruction
pointer/line number very well so it's not very informative. I tried compiling
julia with -pg but, upon running my test script, did not get a gmon.out file.
Best,
--Tim
Details about what I tried:
~/src/julia$ git diff
diff --git a/src/Makefile b/src/Makefile
index 4629ff9..7cb8282 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -20,7 +20,8 @@ FLAGS := \
ifneq ($(USEMSVC), 1)
FLAGS += -Wall -Wno-strict-aliasing -fno-omit-frame-pointer -
fvisibility=hidden -fno-common
-Wpointer-arith -Wundef
-override CFLAGS += -Wold-style-definition -Wstrict-prototypes -Wc++-compat
+override CFLAGS += -Wold-style-definition -Wstrict-prototypes -Wc++-compat -pg
+LDFLAGS += -pg
endif
~/src/julia$ touch src/julia.h
~/src/julia$ make debug
~/src/julia$ cd test
~/src/julia/test$ ../julia -e 'using Base.Test; include("subarray.jl")'
("subarray.jl" turns out to be a stress-test for the compiler, specifically for
jl_egal, and I'd like to see if there's anything that can be done to make it
faster.)