Skip to content
New issue

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

bpftrace: Fix usdt reads in various architecture #1325

Merged
merged 1 commit into from
May 12, 2020

Conversation

sumanthkorikkar
Copy link
Contributor

@sumanthkorikkar sumanthkorikkar commented May 11, 2020

In USDT tracing, bpftrace uses bcc library function
bcc_usdt_get_argument to retrieve the arg passed to the DTRACE_PROBE().
The value present in the arg string is "gprs[0-15]" in s390. However it
is named as "r[0-15]" in bpftrace. This leads to offset for register
"gprs[0-15]" not known error.

Fix this by creating an alias of each register for s390x/ppc64. aarch64 already does it.
x86 does have the same convention in bpftrace and bcc.

Signed-off-by: Sumanth Korikkar sumanthk@linux.ibm.com

Checklist
  • Language changes are updated in docs/reference_guide.md
  • User-visible and non-trivial changes updated in CHANGELOG.md

@sumanthkorikkar
Copy link
Contributor Author

sumanthkorikkar commented May 11, 2020

Hi @fbs, @danobi

Note: Address space separation patch (probe read split) still needed on s390 for uprobes/usdt. However, this should fix the failure, once the probe read split is integrated to master.

Thank you.

@danobi
Copy link
Member

danobi commented May 11, 2020

Can you add an entry in the changelog?

Other than that, LGTM.

In USDT tracing, bpftrace uses bcc library function
bcc_usdt_get_argument to retrieve the arg passed to the DTRACE_PROBE().
The value present in the arg string is "gprs[0-15]" in s390. However it
is named as "r[0-15]" in bpftrace. This leads to offset for register
"gprs[0-15]" not known error.

Fix this by creating an alias of each register. aarch64 already does it.
x86 does have the same convention in bpftrace and bcc.

Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
@sumanthkorikkar
Copy link
Contributor Author

sumanthkorikkar commented May 12, 2020

Can you add an entry in the changelog?

Added

Other than that, LGTM.

Let me check. Thank you

@danobi danobi merged commit de0c5ca into bpftrace:master May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants