Skip to content

Commit 767f6cf

Browse files
committed
build: add perf target
1 parent 5b6e6d6 commit 767f6cf

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

CMakeUserPresets.json

+14
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@
4343
"inherits": ["ci-ubuntu"],
4444
"cacheVariables": {
4545
}
46+
},
47+
{
48+
"name": "perf-analysis",
49+
"displayName": "Performance Analysis Build",
50+
"description": "Release build with perf support for performance analysis",
51+
"binaryDir": "${sourceDir}/build/perf-analysis",
52+
"inherits": ["ci-sanitize"],
53+
"cacheVariables": {
54+
}
4655
}
4756
],
4857
"buildPresets": [
@@ -70,6 +79,11 @@
7079
"name": "ci-linux-local",
7180
"configurePreset": "ci-linux-local",
7281
"configuration": "Debug"
82+
},
83+
{
84+
"name": "perf-analysis",
85+
"configurePreset": "perf-analysis",
86+
"configuration": "Debug"
7387
}
7488
],
7589
"testPresets": [

Makefile

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
.PHONY: git_clean cmake_clean debug release sanitize ci-ubuntu
2+
.PHONY: git_clean cmake_clean debug release sanitize ci-ubuntu perf
33

44
all: debug
55

@@ -39,3 +39,11 @@ ci-ubuntu:
3939
cmake --preset=ci-linux-local
4040
cmake --build --preset=ci-linux-local
4141
ln -sf build/ci-linux-local/compile_commands.json .
42+
43+
perf:
44+
cmake --preset=perf-analysis
45+
cmake --build --preset=perf-analysis
46+
ln -sf build/perf-analysis/compile_commands.json .
47+
@echo "Build complete. To run perf analysis, use:"
48+
@echo "perf record -g ./build/perf-analysis/your_application"
49+
@echo "perf report"

0 commit comments

Comments
 (0)