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:
parent
b6bb252e23
commit
8d13832d31
@ -42,7 +42,10 @@ state_prefix["subsystem"]=SPDK_NVMF_SUBSYSTEM_
|
|||||||
enums=$(print_enums)
|
enums=$(print_enums)
|
||||||
clear=$(print_clear)
|
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
|
cat <<- ENUM
|
||||||
|
|
||||||
BEGIN {
|
BEGIN {
|
||||||
$enums
|
$enums
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user