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

stack walking scripts #313

Merged
merged 1 commit into from
Jan 16, 2016
Merged

stack walking scripts #313

merged 1 commit into from
Jan 16, 2016

Conversation

brendangregg
Copy link
Member

No description provided.

bp = ctx->bp;

// unrolled loop (MAXDEPTH):
if (!(key.ret[depth++] = get_frame(&bp))) goto out;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow. that's a cool hack :)
proper stack support is #1 on my todo list.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! yes, once proper support exists (bpf_ routines) these scripts can be edited.

@4ast
Copy link
Member

4ast commented Jan 16, 2016

I was afraid that we'd have to wait for kernel stack trace support to get this type of tools working, but you've managed to get it working with unrolled probe_read. Awesome. Starting to play with it...

4ast added a commit that referenced this pull request Jan 16, 2016
@4ast 4ast merged commit 120bfad into iovisor:master Jan 16, 2016
if (!ret || ret < __START_KERNEL_map)
return 0;
if (bpf_probe_read(bp, sizeof(*bp), (void *)*bp))
bp = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed (belatedly) while reading through the blog entry, shouldn't this be *bp = 0;?

@brendangregg
Copy link
Member Author

Good catch, thanks. Plus I can simplify the test on line 89. Pull request forthcoming...

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