Skip to content

Fix the partial kernel/userspace stackwalking#69

Merged
jbachorik merged 1 commit into
mainfrom
jb/perf_stackwalking
Feb 9, 2024
Merged

Fix the partial kernel/userspace stackwalking#69
jbachorik merged 1 commit into
mainfrom
jb/perf_stackwalking

Conversation

@jbachorik
Copy link
Copy Markdown
Collaborator

@jbachorik jbachorik commented Feb 9, 2024

What does this PR do?:
It fixes the mixed kernel/userspace stackwalking

Motivation:
The current logic seems flawed when using perf_event_open scheduler and it fails to get the non-kernel part of the stacktrace.
The fix is trivial and it does fix the issue.

How to test the change?:
One must have a system with perf_event_open available. Collected stacktraces should not contain a significant number of UNKNOWN_PACKAGE frames.

For Datadog employees:

  • If this PR touches code that signs or publishes builds or packages, or handles
    credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.
  • JIRA ticket: PROF-9142

Unsure? Have a question? Request a review!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 9, 2024

🔧 Report generated by pr-comment-cppcheck

CppCheck Report

Warnings (5)

Style Violations (164)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 9, 2024

🔧 Report generated by pr-comment-scanbuild

Scan-Build Report

User:runner@fv-az523-512
Working Directory:/home/runner/work/java-profiler/java-profiler/ddprof-lib/src/test/make
Command Line:make -j4 clean all
Clang Version:Ubuntu clang version 14.0.0-1ubuntu1.1
Date:Fri Feb 9 12:37:45 2024

Bug Summary

Bug TypeQuantityDisplay?
All Bugs6
Logic error
Assigned value is garbage or undefined1
Dereference of null pointer2
Result of operation is garbage or undefined1
Unused code
Dead initialization1
Dead nested assignment1

Reports

Bug Group Bug Type ▾ File Function/Method Line Path Length
Logic errorAssigned value is garbage or undefineddwarf.cppparseInstructions23520
Unused codeDead initializationlivenessTracker.cppcleanup_table451
Unused codeDead nested assignmentvmStructs.cppcheckNativeBinding8181
Logic errorDereference of null pointerflightRecorder.cppflush14098
Logic errorDereference of null pointersafeAccess.hload3518
Logic errorResult of operation is garbage or undefineddwarf.hgetSLeb14225

Copy link
Copy Markdown
Contributor

@richardstartin richardstartin left a comment

Choose a reason for hiding this comment

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

Good catch, let's upstream this one

@jbachorik jbachorik merged commit d6c6797 into main Feb 9, 2024
@github-actions github-actions Bot added this to the 0.97.0 milestone Feb 9, 2024
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