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

ease the use of perf probe #66924

Open
teto opened this issue Aug 19, 2019 · 3 comments
Open

ease the use of perf probe #66924

teto opened this issue Aug 19, 2019 · 3 comments
Assignees
Labels
0.kind: enhancement 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: developer experience

Comments

@teto
Copy link
Member

teto commented Aug 19, 2019

I need to trace some variables in the kernel. I tried using perf on nixos but this was not straightforward
strace -olog perf probe -L tcp_cong_avoid_ai
fails with

Failed to find the path for the kernel: No such file or directory
  Error: Failed to show lines.

I started developing a patch to add vmlinux (present in ${kernel.dev}/vmlinux) to tools/perf/util/symbol.c but there is no stable path to that file.

I've then stumbled on https://www.mail-archive.com/nix-commits-bounces@lists.science.uu.nl/msg04507.html that puts vmlinux in a stable path but it doesn't explain how perf looks into that folder: @viric do you have a custom patch in your repo ?

@teto
Copy link
Member Author

teto commented Aug 19, 2019

nevermind, perf help probe explains how to pass a custom path :/

@teto teto closed this as completed Aug 19, 2019
@teto teto reopened this Aug 20, 2019
@teto
Copy link
Member Author

teto commented Aug 20, 2019

usage of perf is not pleasant, thus I reopen the issue to discuss how to make it more straightforward.
since the CLI get long. I wonder if we should not patch the perf source to not have to run this kind of command
`perf --debug verbose probe -k /nix/store/5am9gvlr7wkcwy48kibhvq16l624iw6h-linux-5.1.0-mptcp_v0.96.0-dev/vmlinux -m /run/booted-system/kernel-modules -s /home/teto/mptcp 'tcp_cong_avoid_ai tp->snd_cwnd_clamp'

Also using compressed modules seem to trouble perf. Maybe with a nixos module we could add some warnings checking for MODULE_COMPRESS settings etc

@stale
Copy link

stale bot commented Jun 2, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: enhancement 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: developer experience
Projects
None yet
Development

No branches or pull requests

2 participants