Skip to content

improve performance using Unsafe to activate/deactivate thread filter#226

Closed
zhengyu123 wants to merge 11 commits into
mainfrom
zgu/threadFilter_unsafe
Closed

improve performance using Unsafe to activate/deactivate thread filter#226
zhengyu123 wants to merge 11 commits into
mainfrom
zgu/threadFilter_unsafe

Conversation

@zhengyu123

@zhengyu123 zhengyu123 commented Jun 16, 2025

Copy link
Copy Markdown
Contributor

What does this PR do?:
JavaProfiler activate/deactivate a thread for profiling via JNI call, which is expensive.

This enhancement intends to expose native bitmap, that is used for tracking thread’s state, to java and uses Unsafe API to update the bitmap directly.

Motivation:
Improve performance

Additional Notes:

Used Erwan's thread filter benchmark:

Baseline:
before

After patch:
Screenshot 2025-06-16 at 10 10 35 AM

How to test the change?:

  • gradlew testdebug/testrelease
  • ddprof-stresstest + Erwan's thread filter benchmark

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

Unsure? Have a question? Request a review!

@github-actions

github-actions Bot commented Jun 16, 2025

Copy link
Copy Markdown
Contributor

🔧 Report generated by pr-comment-cppcheck

CppCheck Report

Errors (2)

Warnings (4)

Style Violations (297)

@github-actions

github-actions Bot commented Jun 16, 2025

Copy link
Copy Markdown
Contributor

🔧 Report generated by pr-comment-scanbuild

@zhengyu123 zhengyu123 closed this Jun 17, 2025
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.

1 participant