Skip to content

Commit b012ab3

Browse files
authored
Merge pull request #27466 from DokFaust/df/operflist
Reintegrate external profiling support
2 parents 91c2da8 + 8d0fcdb commit b012ab3

10 files changed

+785
-2
lines changed

.gitignore

+2
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

+9
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

+6
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)