Closed Bug 944702 Opened 11 years ago Closed 8 years ago

Tracelogger: Add hints about what sort of thread the logger is logging

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1296878

People

(Reporter: h4writer, Assigned: wuwei)

References

Details

Attachments

(1 file)

We have different types of threads running:
- mainThread
- background GC thread
- background Compile thread
- ...

Currently tracelogger can't really distinguish them and it would be good for the UI to have some idea what the different files contain.
Depends on: 944392
Blocks: 1008846
(In reply to Hannes Verschore [:h4writer] from comment #0)
> We have different types of threads running:
> - mainThread
> - background GC thread
> - background Compile thread
> - ...
> 
> Currently tracelogger can't really distinguish them and it would be good for
> the UI to have some idea what the different files contain.

Hi, is this feature still needed? I'm happy to implement it if you think worth.
Flags: needinfo?(hv1989)
(In reply to Wei Wu [:w :wuwei UTC+8] from comment #1)
> (In reply to Hannes Verschore [:h4writer] from comment #0)
> > We have different types of threads running:
> > - mainThread
> > - background GC thread
> > - background Compile thread
> > - ...
> > 
> > Currently tracelogger can't really distinguish them and it would be good for
> > the UI to have some idea what the different files contain.
> 
> Hi, is this feature still needed? I'm happy to implement it if you think
> worth.

Discussed on IRC. I'll try to submit a patch.
Assignee: nobody → lazyparser
Flags: needinfo?(hv1989)
According to bug 931151, I think I need to import 'PR_GetThreadName' into PosixNSPR.{h,cpp}
(In reply to Wei Wu [:w :wuwei UTC+8] from comment #3)
> According to bug 931151, I think I need to import 'PR_GetThreadName' into
> PosixNSPR.{h,cpp}

First try: use TheadName prop:
https://dxr.mozilla.org/mozilla-central/search?q=PR_SetCurrentThreadName%28%22&redirect=false&case=true
> [{"tree":"tl-tree.0.tl", "events":"tl-event.0.tl", "dict":"tl-dict.0.json", "treeFormat":"64,64,31,1,32", "Main Thread"},
> {"tree":"tl-tree.1.tl", "events":"tl-event.1.tl", "dict":"tl-dict.1.json", "treeFormat":"64,64,31,1,32", "JS Helper"},
> {"tree":"tl-tree.2.tl", "events":"tl-event.2.tl", "dict":"tl-dict.2.json", "treeFormat":"64,64,31,1,32", "JS Helper"},
> {"tree":"tl-tree.3.tl", "events":"tl-event.3.tl", "dict":"tl-dict.3.json", "treeFormat":"64,64,31,1,32", "JS Helper"},
> {"tree":"tl-tree.4.tl", "events":"tl-event.4.tl", "dict":"tl-dict.4.json", "treeFormat":"64,64,31,1,32", "JS Helper"},
> {"tree":"tl-tree.5.tl", "events":"tl-event.5.tl", "dict":"tl-dict.5.json", "treeFormat":"64,64,31,1,32", "JS Helper"},
> {"tree":"tl-tree.6.tl", "events":"tl-event.6.tl", "dict":"tl-dict.6.json", "treeFormat":"64,64,31,1,32", "JS Helper"},
> {"tree":"tl-tree.7.tl", "events":"tl-event.7.tl", "dict":"tl-dict.7.json", "treeFormat":"64,64,31,1,32", "JS Helper"},
> {"tree":"tl-tree.8.tl", "events":"tl-event.8.tl", "dict":"tl-dict.8.json", "treeFormat":"64,64,31,1,32", "JS Helper"}]

Hm, seems indistinguishable.
Attached patch WIPSplinter Review
WIP version for feedback.
seems we don't set thread name when we use helper threads for off thread compilation or gc, i'd like to implement it it the idea of using thread name is feasible.
A few func signatures were changed, not sure the feasibility neither.
Attachment #8697840 - Flags: feedback?(hv1989)
https://dxr.mozilla.org/mozilla-central/source/js/src/vm/HelperThreads.cpp#1576-1596

Seems that in SM GC thread, Ion thread and AsmJS thread are unified.
so the thread name in SM may not be feasible.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Attachment #8697840 - Flags: feedback?(hv1989)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: