Skip to content

Keep thread name after attaching it to JVM#1713

Open
mzimonczyk-here wants to merge 1 commit into
heremaps:masterfrom
mzimonczyk-here:mzimonczyk/jniThreadBinder
Open

Keep thread name after attaching it to JVM#1713
mzimonczyk-here wants to merge 1 commit into
heremaps:masterfrom
mzimonczyk-here:mzimonczyk/jniThreadBinder

Conversation

@mzimonczyk-here

Copy link
Copy Markdown
Contributor

When native thread is attached to JVM, then it's name is taken from JavaVMAttachArgs. When no JavaVMAttachArgs, or no JavaVMAttachArgs::name passed, then JVM on its own decides on naming thread. Those names are not descriptive. To preserve thread name, pass the currently set thread name in JavaVMAttachArgs::name.

When native thread is attached to JVM, then it's name is taken from JavaVMAttachArgs. When no JavaVMAttachArgs, or no JavaVMAttachArgs::name passed, then JVM on its own decides on naming thread. Those names are not descriptive.
To preserve thread name, pass the currently set thread name in JavaVMAttachArgs::name.

Relates-To: HNAV-15387

Signed-off-by: Michal Zimonczyk <ext-michal.zimonczyk@here.com>
@mzimonczyk-here mzimonczyk-here force-pushed the mzimonczyk/jniThreadBinder branch from 38bcbb4 to 45c955c Compare July 13, 2026 14:56
@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.29%. Comparing base (8ce8ddc) to head (45c955c).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1713      +/-   ##
==========================================
- Coverage   80.30%   80.29%   -0.01%     
==========================================
  Files         356      356              
  Lines       14285    14284       -1     
  Branches     1564     1564              
==========================================
- Hits        11471    11469       -2     
- Misses       2182     2185       +3     
+ Partials      632      630       -2     

see 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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