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

Add profiler counters for time spent in stack unwinding #195

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bric3
Copy link
Collaborator

@bric3 bric3 commented Mar 20, 2025

What does this PR do?:

Use TSC time counters for unwinding.

How to test the change?:

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: PROF-11368

Unsure? Have a question? Request a review!

Copy link

github-actions bot commented Mar 20, 2025

🔧 Report generated by pr-comment-scanbuild

Scan-Build Report

User:runner@fv-az788-802
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 18.1.3 (1ubuntu1)
Date:Fri Mar 21 12:53:47 2025

Bug Summary

Bug TypeQuantityDisplay?
All Bugs7
Logic error
Dereference of null pointer3
Suspicious operation
Bitwise shift1
Unused code
Dead initialization2
Dead nested assignment1

Reports

Bug Group Bug Type ▾ File Function/Method Line Path Length
Suspicious operationBitwise shiftvmStructs.cppfind90216
Unused codeDead initializationjavaApi.cppJava_com_datadoghq_profiler_JavaProfiler_getStatus01161
Unused codeDead initializationstackWalker.cppwalkDwarf1601
Unused codeDead nested assignmentvmStructs.cppcheckNativeBinding10071
Logic errorDereference of null pointersafeAccess.hload3318
Logic errorDereference of null pointersymbols_linux.hElfParser14428
Logic errorDereference of null pointerflightRecorder.cppflush15048

Copy link

github-actions bot commented Mar 20, 2025

🔧 Report generated by pr-comment-cppcheck

CppCheck Report

Warnings (7)

Style Violations (398)

@MattAlp MattAlp requested review from r1viollet and MattAlp March 20, 2025 20:22
Note still debating on how to add/declare these counters.

PROF-11368
@jbachorik
Copy link
Collaborator

HI @bric3 - you picked the right approach with the counters.
But it will be better if you have only one counter for the whole unwinding - keeping track of each unwound frame type would be too expensive.

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