bpf: avoid "BEGIN {" being commented out

Make "BEGIN {" start from a new line, or if there is some annotation
at the end of bpftrace script file, "BEGIN {" will be commented out,
like "//end of fileBEGIN {", then it reports "syntax error, unexpected
map, expecting {".

Change-Id: I1495e555834c1b3c28df011dcdbaa1420c14a5df
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14641
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Richael Zhuang 2022-09-21 14:19:23 +08:00 committed by Tomasz Zawadzki
parent b6bb252e23
commit 8d13832d31

View File

@ -42,7 +42,10 @@ state_prefix["subsystem"]=SPDK_NVMF_SUBSYSTEM_
enums=$(print_enums)
clear=$(print_clear)
# Add an empty line before "BEGIN {" to avoid it being commented out
# when there is annotation at the end of bpftrace script
cat <<- ENUM
BEGIN {
$enums
}