Skip to content

Commit 8d0fcdb

Browse files
fisiognomicovchuravy
authored andcommitted
Added the capability of looking up JIT symbols for perf
Moved Oprofile Wrapper, implemented RegisterJITEventListener and NotifyFinalized Added PerfJITEventListener as an LLVM Patch Added IntelJITEventListener Support Added LLVM Patch, removed redundant Oprofile code, wipe blanklines, Register OProfile JITEvent, fixed oprofile compile flag, rebased llvm 6.0 checksums Added Perf profiling support as an LLVM patch.
1 parent 6c47c24 commit 8d0fcdb

10 files changed

Lines changed: 785 additions & 2 deletions

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
/dist-extras
55
/julia
66
/usr
7+
/oprofile_data
78
/usr-staging
89
/Make.user
910
/julia-*
@@ -24,4 +25,5 @@
2425
*.jl.mem
2526
*.ji
2627

28+
/perf*
2729
.DS_Store

Make.inc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ endif
7272
# Set to 1 to enable profiling with OProfile
7373
USE_OPROFILE_JITEVENTS ?= 0
7474

75+
# Set to 1 to enable profiling with perf
76+
USE_PERF_JITEVENTS ?= 0
77+
7578
# libc++ is standard on OS X 10.9, but not for earlier releases
7679
USE_LIBCPP := 0
7780

@@ -1067,6 +1070,12 @@ ifeq ($(DISABLE_LIBUNWIND), 1)
10671070
JCPPFLAGS += -DJL_DISABLE_LIBUNWIND
10681071
endif
10691072

1073+
# perf
1074+
ifeq ($(USE_PERF_JITEVENTS), 1)
1075+
JCPPFLAGS += -DJL_USE_PERF_JITEVENTS
1076+
endif
1077+
1078+
10701079
# Intel libraries
10711080

10721081
ifeq ($(USE_INTEL_LIBM), 1)

deps/llvm.mk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ ifeq ($(USE_OPROFILE_JITEVENTS), 1)
9898
LLVM_CMAKE += -DLLVM_USE_OPROFILE:BOOL=ON
9999
endif # USE_OPROFILE_JITEVENTS
100100

101+
ifeq ($(USE_PERF_JITEVENTS), 1)
102+
LLVM_CMAKE += -DLLVM_USE_PERF:BOOL=ON
103+
endif # USE_PERF_JITEVENTS
104+
101105
ifeq ($(BUILD_LLDB),1)
102106
ifeq ($(USECLANG),0)
103107
LLVM_CXXFLAGS += -std=c++0x
@@ -494,6 +498,8 @@ $(eval $(call LLVM_PATCH,llvm-rL332302)) # remove for 7.0
494498
$(eval $(call LLVM_PATCH,llvm-rL332694)) # remove for 7.0
495499
$(eval $(call LLVM_PATCH,llvm-rL327898)) # remove for 7.0
496500
$(eval $(call LLVM_PATCH,llvm-6.0-DISABLE_ABI_CHECKS))
501+
$(eval $(call LLVM_PATCH,llvm-OProfile-line-num))
502+
$(eval $(call LLVM_PATCH,llvm-D44892-Perf-integration))
497503
endif # LLVM_VER
498504

499505
# Remove hardcoded OS X requirements in compilter-rt cmake build

0 commit comments

Comments
 (0)