Skip to content

Improve detecting subclass of Thread - #741

Merged
zhengyu123 merged 4 commits into
mainfrom
zgu/thread_subclass
Aug 18, 2026
Merged

Improve detecting subclass of Thread#741
zhengyu123 merged 4 commits into
mainfrom
zgu/thread_subclass

Conversation

@zhengyu123

@zhengyu123 zhengyu123 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?:
Improve and simplify detection subclass of Thread

Motivation:
Enhancement.

Additional Notes:

How to test the change?:
Regular CI tests

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 security review (run the dd:platform-security-review
    skill, or file a request via the PSEC review form).
    bewaire also runs automatically on every PR.
  • This PR doesn't touch any of that.
  • JIRA: PROF-15782

Unsure? Have a question? Request a review!

@zhengyu123
zhengyu123 requested a lite review from Copilot August 18, 2026 01:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR simplifies the logic used to detect whether a run()V method belongs to a Thread type by replacing a manual superclass traversal with a single Class.isAssignableFrom check.

Changes:

  • Replaced a java/lang/Class.equals + superclass-walk loop with a call to isAssignableFrom.
  • Removed the extra java/lang/Class lookup and related reflection calls.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread ddprof-lib/src/main/cpp/flightRecorder.cpp Outdated
zhengyu123 and others added 2 commits August 18, 2026 03:09
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@zhengyu123

Copy link
Copy Markdown
Contributor Author

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@zhengyu123
zhengyu123 marked this pull request as ready for review August 18, 2026 01:36
@zhengyu123
zhengyu123 requested a review from a team as a code owner August 18, 2026 01:36
@dd-octo-sts

dd-octo-sts Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

All 40 integration tests passed

📊 Dashboard · 👷 Pipeline · 📦 69ce94b8

@dd-octo-sts

dd-octo-sts Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

CI Test Results

Run: #32138661798 | Commit: 72de1e7 | Duration: 14m 28s (longest job)

All 32 test jobs passed

Status Overview

JDK glibc-aarch64/debug glibc-amd64/debug musl-aarch64/debug musl-amd64/debug
8 - - -
8-ibm - - -
8-j9 - -
8-librca - -
8-orcl - - -
11 - - -
11-j9 - -
11-librca - -
17 - -
17-graal - -
17-j9 - -
17-librca - -
21 - -
21-graal - -
21-librca - -
25 - -
25-graal - -
25-librca - -

Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled

Summary: Total: 32 | Passed: 32 | Failed: 0


Updated: 2026-08-18 13:05:10 UTC

@jbachorik jbachorik left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@dd-octo-sts

dd-octo-sts Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Scan-Build Report

User:runner@runnervmzvulz
Working Directory:/home/runner/work/java-profiler/java-profiler/ddprof-lib/src/test/make
Command Line:make -j4 all
Clang Version:Ubuntu clang version 18.1.3 (1ubuntu1)
Date:Tue Aug 18 12:49:21 2026

Bug Summary

Bug TypeQuantityDisplay?
All Bugs1
Logic error
Dereference of null pointer1

Reports

Bug Group Bug Type ▾ File Function/Method Line Path Length
Logic errorDereference of null pointerprofiler.hfindLibraryByAddress52328

@zhengyu123
zhengyu123 merged commit c2cc967 into main Aug 18, 2026
89 of 99 checks passed
@zhengyu123
zhengyu123 deleted the zgu/thread_subclass branch August 18, 2026 12:54
@github-actions github-actions Bot added this to the 1.50.0 milestone Aug 18, 2026
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.

4 participants