Closed Bug 564161 Opened 16 years ago Closed 7 years ago

Profiler needs API to expose which objects are GC roots

Categories

(Tamarin Graveyard :: Profiler, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX
Q1 12 - Brannan

People

(Reporter: mike, Unassigned)

References

Details

In order for client profilers such as Flash Builder to be able to accurately determine the path to GC root of a given object, the VM's profiler API needs to expose which objects are GC roots. Currently, Flash Builder uses a heuristic to guess which objects are probably GC roots: If an object has no references to it, then it is considered to be a GC root. This works fairly well, but it breaks down when there are cycles. E.g. what if we are trying to determine the path to GC root for object A, which is pointed to by B, which is pointed to by two GC roots, GC1 and GC2 -- but GC1 and GC2 have pointers to each other: GC1 / / A <---- B \ \ GC2 In that case, Flash Builder can't figure out that GC1 and GC2 are GC roots. And it gets even worse if a GC root and a non-GC root have circular references. Note, this bug isn't really worth fixing until bug 558385 has been fixed (Memory profiler should do a better job of accounting for internal non-ActionScript allocations), because as of today, the chain of objects will frequently be broken in the middle whenever it reaches a C++ allocation, so Flash Builder would have to fall back on its heuristic anyway.
Depends on: 558385
In the above ASCII drawing, there should have been a line between GC1 and GC2, indicating references back and forth.
Since the GC knows exactly what is a root, can that info be communicated to the profiler?
Yes, that's the idea. This will be easy to do.
Assignee: nobody → mmoreart
Flags: flashplayer-qrb+
Priority: -- → P3
Target Milestone: --- → flash10.2
Status: NEW → ASSIGNED
Assignee: mmoreart → nobody
Component: Virtual Machine → Profiler
QA Contact: vm → profiler
Flags: flashplayer-bug-
Target Milestone: Q3 11 - Serrano → Q1 12 - Brannan
No assignee, updating the status.
Status: ASSIGNED → NEW
No assignee, updating the status.
No assignee, updating the status.
No assignee, updating the status.
Tamarin isn't maintained anymore. WONTFIX remaining bugs.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.