We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On aarch64, systemtap sometimes generates probes like -8@v0. Currently, libbpf only handles e.g. 8@x24. Support for v%d is needed.
-8@v0
8@x24
v%d
libbpf/src/usdt.c
Lines 1373 to 1379 in 46eafba
I currently don't have time to work on this. Opening an issue here makes it easier for others with this problem to find this.
The text was updated successfully, but these errors were encountered:
This let me use the -8@v0 arguments on aarch64.
diff --git a/src/usdt.c b/src/usdt.c index d18e37982..25048455a 100644 --- a/src/usdt.c +++ b/src/usdt.c @@ -1339,6 +1339,9 @@ static int calc_pt_regs_off(const char *reg_name) if (sscanf(reg_name, "x%d", ®_num) == 1) { if (reg_num >= 0 && reg_num < 31) return offsetof(struct user_pt_regs, regs[reg_num]); + } else if (sscanf(reg_name, "v%d", ®_num) == 1) { + if (reg_num >= 0 && reg_num < 31) + return offsetof(struct user_pt_regs, regs[reg_num]); } else if (strcmp(reg_name, "sp") == 0) { return offsetof(struct user_pt_regs, sp); }
I haven't send a patch upstream yet and might not get to it in the near future. If someone wants to pick this up in the meantime, feel free to do so.
Sorry, something went wrong.
Does it do the right thing, though? Is x0 and v0 the same register?
This let me use the -8@v0 arguments on aarch64. Does it do the right thing, though? Is x0 and v0 the same register?
Hm, right. I doesn't seem like it https://developer.arm.com/documentation/102374/0101/Registers-in-AArch64---general-purpose-registers
There is a separate set of 32 registers used for floating point and vector operations.
Seems like v0 is a vector register which are not the same as x registers. I'll investigate.
v0
x
No branches or pull requests
On aarch64, systemtap sometimes generates probes like
-8@v0
. Currently, libbpf only handles e.g.8@x24
. Support forv%d
is needed.libbpf/src/usdt.c
Lines 1373 to 1379 in 46eafba
I currently don't have time to work on this. Opening an issue here makes it easier for others with this problem to find this.
The text was updated successfully, but these errors were encountered: