Skip to content

Accurate CPU sampling without perf_events#58

Merged
jbachorik merged 1 commit into
mainfrom
jb/ctimer
Jan 2, 2024
Merged

Accurate CPU sampling without perf_events#58
jbachorik merged 1 commit into
mainfrom
jb/ctimer

Conversation

@jbachorik
Copy link
Copy Markdown
Collaborator

@jbachorik jbachorik commented Dec 28, 2023

What does this PR do?:
Ports the create_timer sampler implementation from async-profiler

Motivation:
Provide an accurate CPU sampler on systems with no accessible perf_events

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-8841

Unsure? Have a question? Request a review!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 28, 2023

🔧 Report generated by pr-comment-cppcheck

CppCheck Report

Warnings (2)

Style Violations (154)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 28, 2023

🔧 Report generated by pr-comment-scanbuild

Scan-Build Report

User:runner@fv-az1382-721
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:Tue Jan 2 12:07:50 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.cppparseInstructions23120
Unused codeDead initializationlivenessTracker.cppcleanup_table451
Unused codeDead nested assignmentvmStructs.cppcheckNativeBinding6951
Logic errorDereference of null pointerflightRecorder.cppflush14088
Logic errorDereference of null pointersafeAccess.hload3518
Logic errorResult of operation is garbage or undefineddwarf.hgetSLeb12325

@jbachorik jbachorik force-pushed the jb/ctimer branch 9 times, most recently from 7a07436 to c20f9f2 Compare January 2, 2024 09:39
@jbachorik jbachorik marked this pull request as ready for review January 2, 2024 09:39
Comment thread ddprof-test/src/test/java/com/datadoghq/profiler/cpu/CTimerSamplerTest.java Outdated
Co-authored-by: Jaroslav Bachorik <jaroslav.bachorik@datadoghq.com>
@jbachorik jbachorik merged commit f67ca67 into main Jan 2, 2024
@jbachorik jbachorik deleted the jb/ctimer branch January 2, 2024 12:16
@github-actions github-actions Bot added this to the 0.93.0 milestone Jan 2, 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.

3 participants