smb2_negprot: add CALLGRIND_START_INSTRUMENTATION after SMB2 negprot
authorStefan Metzmacher <metze@samba.org>
Tue, 25 Apr 2023 15:38:30 +0000 (15:38 +0000)
committerStefan Metzmacher <metze@samba.org>
Thu, 1 Jun 2023 07:20:31 +0000 (07:20 +0000)
commite03ccb5b12bca8588baca70c4d45702833c7bdd5
tree269de13eccfca0c0b7efd7d077bbd6fd0c5ec865
parent77c925681dc964adc67aa866ae47149dabd576e9
smb2_negprot: add CALLGRIND_START_INSTRUMENTATION after SMB2 negprot

This allows us to support starting smbd under callgrind and only start
the overhead and instrumentation after the SMB2 negprot, this allows us
to profile only useful stuff and not all the smbd startup, forking and
multichannel handling.

This will do the trick:

  valgrind --tool=callgrind --instr-atstart=no smbd

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/smbd/smb2_negprot.c