Skip to content

Commit 606051f

Browse files
WIP: initial shell script to configure, build and profile using valgrind/callgrind
1 parent 59654c6 commit 606051f

2 files changed

Lines changed: 811 additions & 0 deletions

File tree

scripts/osx/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,36 @@ The information below is for future reference.
5050
cp ./org.freeradius.radius.plist /Library/LaunchDaemons
5151
launchctl load -w Library/LaunchDaemons/org.freeradius.radiusd.plist
5252
```
53+
54+
Examples:
55+
56+
Reconfigure + rebuild + profile in one run:
57+
```
58+
scripts/osx/profile-callgrind.sh \
59+
--clean \
60+
--cflags "-g3 -O1 -fno-omit-frame-pointer" \
61+
--ldflags "-fno-omit-frame-pointer" \
62+
--jobs 16 \
63+
--run-seconds 60
64+
```
65+
66+
Reconfigure + rebuild only (no profiling run):
67+
```
68+
scripts/osx/profile-callgrind.sh \
69+
--clean \
70+
--configure-only \
71+
--cflags "-g3 -O1 -fno-omit-frame-pointer" \
72+
--ldflags "-fno-omit-frame-pointer" \
73+
--jobs 16
74+
```
75+
76+
Confirm command history log was written:
77+
```
78+
ls -t build/callgrind/commands.radiusd.*.log | head -n 1
79+
```
80+
81+
Inspect the newest log:
82+
```
83+
latest_log=$(ls -t build/callgrind/commands.radiusd.*.log | head -n 1)
84+
sed -n '1,200p' "$latest_log"
85+
```

0 commit comments

Comments
 (0)