Open Bug 1759550 Opened 4 years ago Updated 2 months ago

Discover & profile JVM threads created during profiling session

Categories

(Core :: Gecko Profiler, enhancement, P3)

enhancement

Tracking

()

ASSIGNED

People

(Reporter: mcomella, Assigned: mleclair)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

In the initial implementation of multi-thread support for JVM threads (bug 1618560), we fetch all the matching threads on profiler start and profile those: i.e. we won't profile a thread if it was started during the profiling session.

This bug is to implement this functionality: to actively discover threads during profiling and, if they match our filters, profile them too.

Note: the reason we didn't already implement this is because we're concerned that ThreadGroup.enumerate takes too long to run on every sample (especially at times like 1ms).

(In reply to Michael Comella (:mcomella) [needinfo or I won't see it] from comment #1)

Note: the reason we didn't already implement this is because we're concerned that ThreadGroup.enumerate takes too long to run on every sample (especially at times like 1ms).

In case it helps: It's a similar problem with discovering native threads, especially on Windows (it takes multiple milliseconds). So we run the discovery on a separate thread, and run it less frequently than the sampling interval, to keep its overhead small. Of course that means we can miss the beginning of a thread.

Severity: -- → N/A
Priority: -- → P3
Assignee: nobody → mleclair
Status: NEW → ASSIGNED
Attachment #9495300 - Attachment is obsolete: true
Attachment #9494644 - Attachment description: Bug 1759550: Gecko profiler can capture threads created after it is started in Java r=mstange → WIP: Bug 1759550: Fixed profiler to find Threads created after the profiler is started.
Attachment #9494644 - Attachment description: WIP: Bug 1759550: Fixed profiler to find Threads created after the profiler is started. → Bug 1759550: Fixed profiler to find Threads created after the profiler is started. r=mstange
Attachment #9494644 - Attachment description: Bug 1759550: Fixed profiler to find Threads created after the profiler is started. r=mstange → Bug 1759550: Discover JVM threads created during profiling in GeckoJavaSampler
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: