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

[iovisor/bcc] trace: Incorrect symbol offsets when using build_id (#2161) #2162

Merged
merged 4 commits into from
Jan 29, 2019

Conversation

vijunag
Copy link
Contributor

@vijunag vijunag commented Jan 24, 2019

bcc_bsym_resolve API returned absolute address instead of offset from start of the function.

Added build_id support for BPF stackmap.
A separate build_id stackmap can be created with the help of new macro BPF_STACK_TRACE_BUILDID
The kernel BPF reports stacktrace in the structure bpf_stack_build_id.
Changes have been made to BPF modules to support resolving symbols mentioned in the above format.
An example tool is also available in tools/stack_buildid_example.py
New command line options have been added to tools/trace.py to support the new BUILD_ID stackmap.
List of symbol files can be added to the script to resolve symbols from build id as reported by the kernel
in the stack trace

Updated man page and added an example usage
@yonghong-song
Copy link
Collaborator

@vijunag the majority of changes already in trunk. Could you rebase your change to the trunk and resubmit? Thanks.

@vijunag
Copy link
Contributor Author

vijunag commented Jan 25, 2019

@vijunag the majority of changes already in trunk. Could you rebase your change to the trunk and resubmit? Thanks.
I struggle with rebasing always. Git doesn't automatically rebase on top of merged commits. What is the best way to update the fork and rebase on top ?

@yonghong-song
Copy link
Collaborator

@vijunag The following is what I typically do:

  • Use git remote to add a remote branch to link to the upstream one, e.g.,
     git remote add upstream https://github.com/iovisor/bcc.git
     git fetch upstream
     git checkout upstream/master -b upstream

Periodically you need to git pull your upstream branch to keep it syncing with the trunk.

With the upstream, you can always forcefully update your forked master branch to be up-to-date.

Your work can then rebase on top of the latest code.

@vijunag
Copy link
Contributor Author

vijunag commented Jan 26, 2019

@yonghong-song - Can you check once now ? Only the changes appear now.

@yonghong-song
Copy link
Collaborator

[buildbot, test this please]

@yonghong-song
Copy link
Collaborator

@sandip4n could you check whether this patch fixed the issue or not? Thanks!

@sandip4n
Copy link
Contributor

sandip4n commented Jan 29, 2019

@yonghong-song Apologies for the delay. This works as expected now. Thanks @vijunag
Will close #2161 once this is merged.

@yonghong-song
Copy link
Collaborator

@sandip4n @vijunag thank you both!

@yonghong-song yonghong-song merged commit aa1b904 into iovisor:master Jan 29, 2019
navytux added a commit to navytux/bcc that referenced this pull request Feb 7, 2019
* master: (609 commits)
  docs: references_guide.md: add/fix search examples/tools links (iovisor#2186)
  Fix misc file permissions (iovisor#2185)
  sync with latest bpf (iovisor#2184)
  sync with latest libbpf repo (iovisor#2183)
  docs: fix broken link of bpf_log2l(iovisor#2176)
  examples/tracing: some minor fixes
  Fix tools/syscount -l (iovisor#2180)
  examples/tracing/bitehist.py: add example of linear histogram (iovisor#2177)
  cachestat: bring back HITRATIO column
  Fix debuginfo search on Ubuntu
  Add installation instructions for Amazon Linux 1 AMI Sign-Off-By Travis Davies <[email protected]>
  [iovisor/bcc] trace: Incorrect symbol offsets when using build_id (iovisor#2161) (iovisor#2162)
  profile: exclude CPU idle stacks by default (iovisor#2166)
  fix cpuunclaimed.py with cfs_rq structure change (iovisor#2164)
  tools: rename "deadlock_detector" to "deadlock" (iovisor#2152) (iovisor#2160)
  use libbpf api in bpf_attach_xdp (iovisor#2158)
  support symbol resolution of short-lived process.  (iovisor#2144)
  profile.py: return kernel annotations for folded stacks
  use libbpf APIs from libbpf.c (iovisor#2156)
  ddos_detector.py to monitor DDOS attacks (iovisor#2140)
  ...
palexster pushed a commit to palexster/bcc that referenced this pull request Jul 7, 2019
…visor#2161) (iovisor#2162)

Fix iovisor#2161 - bcc_bsymcache API returned absolute address instead of 
offset from start of the symbol
CrackerCat pushed a commit to CrackerCat/bcc that referenced this pull request Jul 31, 2024
…visor#2161) (iovisor#2162)

Fix iovisor#2161 - bcc_bsymcache API returned absolute address instead of 
offset from start of the symbol
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.

3 participants