From e7a09f7c3f607c17ef17178d32e709fa499de233 Mon Sep 17 00:00:00 2001 From: Richael Zhuang Date: Tue, 13 Sep 2022 11:01:03 +0800 Subject: [PATCH] usdt: fix bpftrace parse error on arm64 bpftrace reports parse error on arm64: "parse error: 8@x0 4@[x21, #:lo12:.LANCHOR2] " using "nr" to override the default constraints string can fix this. //the default is: stapsdt 0x0000004b NT_STAPSDT (SystemTap probe descriptors) Provider: spdk Name: nvmf_tgt_state Location: 0x000000000006e664, Base: 0x00000000001ca6f0, Semaphore: 0x0000000000000000 Arguments: 8@x0 4@[x21, #:lo12:.LANCHOR2] //using "nr" as the constraints string: stapsdt 0x00000036 NT_STAPSDT (SystemTap probe descriptors) Provider: spdk Name: nvmf_tgt_state Location: 0x000000000006f680, Base: 0x00000000001cb730, Semaphore: 0x0000000000000000 Arguments: 8@x0 4@x1 Change-Id: I25736dcf5a8593d2c156da41a2e28532ab8fa570 Signed-off-by: Richael Zhuang Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14642 Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto --- include/spdk_internal/usdt.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/spdk_internal/usdt.h b/include/spdk_internal/usdt.h index d95569bf6..0caa762d7 100644 --- a/include/spdk_internal/usdt.h +++ b/include/spdk_internal/usdt.h @@ -11,6 +11,10 @@ #if defined(SPDK_CONFIG_USDT) && !defined(SPDK_UNIT_TEST) +#if defined(__aarch64__) +#define STAP_SDT_ARG_CONSTRAINT nr +#endif + #include #define SPDK_DTRACE_PROBE(name) DTRACE_PROBE1(spdk,name,spdk_get_ticks())