You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Profile-only run using the auto-detected default env file:
112
-
```
113
-
scripts/osx/profile-callgrind.sh \
114
-
--profile-only \
115
-
--reset-radiusd-args \
116
-
--radiusd-arg -f \
117
-
--radiusd-arg -m \
118
-
--radiusd-arg -l \
119
-
--radiusd-arg stdout \
120
-
--radiusd-conf-file raddb/radiusd.conf \
121
-
--run-seconds 60
122
-
```
123
-
124
-
The `--env-file` argument is optional. If you omit it, `profile-callgrind.sh` automatically sources `build/tests/multi-server/prof-accept/short_ci/freeradius/profiling-server/proto_load_config.env` when that file exists.
125
-
126
-
Argument reference for the profile-only command:
127
-
128
-
-`--profile-only` skips configure and build steps and only runs the profiling phase.
129
-
-`--env-file <path>` sources an environment file before starting `radiusd`. This is mainly used to export `TEST_LOADGEN_*` variables for the `listen load` section in `raddb/radiusd.conf`.
130
-
-`--reset-radiusd-args` clears the script's default `radiusd` arguments before any later `--radiusd-arg` values are appended.
131
-
-`--radiusd-arg -f` keeps `radiusd` in the foreground so valgrind can monitor the live server process directly.
132
-
-`--radiusd-arg -m` enables the runtime behavior you were already using in the wrapper-based runs. If you omit it after `--reset-radiusd-args`, it will not be added automatically.
133
-
-`--radiusd-arg -l` and `--radiusd-arg stdout` send server log output to standard output.
134
-
-`--radiusd-conf-file raddb/radiusd.conf` appends `-d <confdir> -n <name>` for that config file. In this case it tells `radiusd` to use the repository's `raddb/radiusd.conf` profile.
135
-
-`--run-seconds 60` runs the callgrind session for 60 seconds, then stops the profiled valgrind processes and writes the final callgrind output.
136
-
137
-
Behavior notes:
138
-
139
-
- The script launches the `scripts/bin/radiusd` wrapper by default, not `build/bin/local/radiusd` directly.
140
-
- The wrapper supplies the repository-local dictionary and library setup, while the profile script adds your extra `radiusd` flags on top.
141
-
- dSYM generation is enabled by default. Use `--no-dsym` to skip all dSYM generation, or `--no-dsym-modules` to keep the main binary dSYM but skip module dSYMs.
142
-
143
-
Reconfigure (no profiling run):
144
-
```
145
-
scripts/osx/profile-callgrind.sh \
146
-
--clean \
147
-
--configure-only \
148
-
--cflags "-g3 -O1 -fno-omit-frame-pointer" \
149
-
--ldflags "-fno-omit-frame-pointer" \
150
-
--jobs 16
151
-
```
152
-
153
-
Confirm command history log was written:
154
-
```
155
-
ls -t build/callgrind/commands.radiusd.*.log | head -n 1
156
-
```
157
-
158
-
Inspect the newest log:
159
-
```
160
-
latest_log=$(ls -t build/callgrind/commands.radiusd.*.log | head -n 1)
0 commit comments