Closed
Bug 1362814
Opened 8 years ago
Closed 8 years ago
Some precursors for adding a Gecko Profiler label to patched_LdrLoadDll()
Categories
(Core :: General, enhancement)
Core
General
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
References
Details
Attachments
(2 files, 3 obsolete files)
2.79 KB,
patch
|
mstange
:
review+
|
Details | Diff | Splinter Review |
4.70 KB,
patch
|
mstange
:
review+
|
Details | Diff | Splinter Review |
This allows us to easily identify the name of the DLL being loaded
in a profile.
Assignee | ||
Comment 1•8 years ago
|
||
Attachment #8865169 -
Flags: review?(mstange)
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → ehsan
Comment 2•8 years ago
|
||
Comment on attachment 8865169 [details] [diff] [review]
Add a Gecko Profiler label to patched_LdrLoadDll()
Review of attachment 8865169 [details] [diff] [review]:
-----------------------------------------------------------------
Good idea
Attachment #8865169 -
Flags: review?(mstange) → review+
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1fec6894255e
Add a Gecko Profiler label to patched_LdrLoadDll(); r=mstange
Comment 4•8 years ago
|
||
Backed out for breaking Windows builds:
https://hg.mozilla.org/integration/mozilla-inbound/rev/31b8a9e5d1307eeb3990fb00904c115fbdb3d2b1
Push with bustage: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=1fec6894255e3298f36a2a6b91d48b2f96d07b11&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable
Build log: https://treeherder.mozilla.org/logviewer.html#?job_id=97153955&repo=mozilla-inbound
15:32:00 INFO - z:\build\build\src\obj-firefox\dist\include\nsStringFwd.h(15): fatal error C1189: #error: Internal string headers are not available from external-linkage code.
15:32:00 INFO - z:/build/build/src/config/rules.mk:1061: recipe for target 'WindowsDllBlocklist.obj' failed
15:32:00 INFO - mozmake.EXE[5]: *** [WindowsDllBlocklist.obj] Error 2
Flags: needinfo?(ehsan)
Assignee | ||
Comment 5•8 years ago
|
||
Thankfully the MainThreadUtils.h #include in GeckoProfiler.h that causes this is actually not needed!
Flags: needinfo?(ehsan)
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/aefe9ec739e1
Part 0: Remove an unneeded inclusion from GeckoProfiler.h
https://hg.mozilla.org/integration/mozilla-inbound/rev/bd40f51b033f
Part 1: Add a Gecko Profiler label to patched_LdrLoadDll(); r=mstange
Comment 7•8 years ago
|
||
Backed out for Windows bustage in nsStringFwd.h:
https://hg.mozilla.org/integration/mozilla-inbound/rev/284d41dc240f0dea28af10a52327d0e6a99f62cd
https://hg.mozilla.org/integration/mozilla-inbound/rev/b4ca9b55771e84653d6ba21bf2701b33995fc026
Push with bustage: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=bd40f51b033f87a4eb2af2d47e18f14f3f3db3c0&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=97183728&repo=mozilla-inbound
14:46:53 INFO - Note: including file: c:\builds\moz2_slave\m-in-w32-000000000000000000000\build\src\obj-firefox\dist\include\nsStringFwd.h
14:46:53 INFO - c:\builds\moz2_slave\m-in-w32-000000000000000000000\build\src\obj-firefox\dist\include\nsStringFwd.h(15): fatal error C1189: #error: Internal string headers are not available from external-linkage code.
14:46:53 INFO - c:/builds/moz2_slave/m-in-w32-000000000000000000000/build/src/obj-firefox/_virtualenv/Scripts/python.exe c:/builds/moz2_slave/m-in-w32-000000000000000000000/build/src/config/nsinstall.py -t -m 644 'TestCountZeroes.exe' '../../dist/cppunittests'
14:46:53 INFO - mozmake.EXE[5]: Leaving directory 'c:/builds/moz2_slave/m-in-w32-000000000000000000000/build/src/obj-firefox/layout/media'
14:46:53 INFO - c:/builds/moz2_slave/m-in-w32-000000000000000000000/build/src/config/rules.mk:1061: recipe for target 'WindowsDllBlocklist.obj' failed
14:46:53 INFO - mozmake.EXE[5]: *** [WindowsDllBlocklist.obj] Error 2
Flags: needinfo?(ehsan)
Assignee | ||
Comment 8•8 years ago
|
||
I don't understand, I *did* a try push and it came out green: https://treeherder.mozilla.org/#/jobs?repo=try&revision=63f0316f051b37866171ed56ad9c509f3ba09c43
Flags: needinfo?(ehsan)
Assignee | ||
Comment 9•8 years ago
|
||
(In reply to :Ehsan Akhgari (super long backlog, slow to respond) from comment #8)
> I don't understand, I *did* a try push and it came out green:
> https://treeherder.mozilla.org/#/
> jobs?repo=try&revision=63f0316f051b37866171ed56ad9c509f3ba09c43
Sigh, looks like that was pushed on top of m-c by mistake. :-( Sorry about that!
Assignee | ||
Comment 10•8 years ago
|
||
Markus, doing this requires inlining profiler_call_enter and profiler_call_exit, because they need to be callable from mozglue.dll, which requires inlining <https://searchfox.org/mozilla-central/rev/8b70b0a5038ef9472fe7c53e04a70c978bb06aed/tools/profiler/core/platform.cpp#479> and which means its dependencies (PSLockRef and ThreadInfo) will need to be exported publicly. Are you OK with this? This ended up as a rather invasive change. :-/
I have several patches so far that get me to a linker error.
Flags: needinfo?(mstange)
Assignee | ||
Comment 11•8 years ago
|
||
Assignee | ||
Updated•8 years ago
|
Attachment #8865169 -
Attachment is obsolete: true
Assignee | ||
Comment 12•8 years ago
|
||
This allows us to get rid of the nsIMemoryReporter.h inclusion in GeckoProfiler.h.
That brings XPCOM string headers with it.
Assignee | ||
Comment 13•8 years ago
|
||
Otherwise calling them from within mozglue.dll will fail.
Assignee | ||
Comment 14•8 years ago
|
||
This allows us to easily identify the name of the DLL being loaded
in a profile.
Comment 15•8 years ago
|
||
(In reply to :Ehsan Akhgari (super long backlog, slow to respond) from comment #10)
> which means its dependencies (PSLockRef and ThreadInfo) will
> need to be exported publicly. Are you OK with this? This ended up as a
> rather invasive change. :-/
Sounds like this is what njn meant in bug 1359000 comment 4 with "This change really makes the following patches *much* simpler."
Comment 16•8 years ago
|
||
Your patches seem great to me. njn, what was the problem with including PseudoStack.h in GeckoProfiler.h?
Flags: needinfo?(mstange) → needinfo?(n.nethercote)
Assignee | ||
Comment 18•8 years ago
|
||
Comment on attachment 8865310 [details] [diff] [review]
Part 1: Remove an unneeded inclusion from GeckoProfiler.h
This one can land (since the overall patchset may get stalled for a while)
Attachment #8865310 -
Flags: review?(mstange)
Assignee | ||
Comment 19•8 years ago
|
||
Comment on attachment 8865311 [details] [diff] [review]
Part 2: Move GeckoProfilerReporter to its own header
So can this.
Attachment #8865311 -
Flags: review?(mstange)
Updated•8 years ago
|
Attachment #8865310 -
Flags: review?(mstange) → review+
Updated•8 years ago
|
Attachment #8865311 -
Flags: review?(mstange) → review+
Assignee | ||
Updated•8 years ago
|
Keywords: leave-open
Assignee | ||
Comment 20•8 years ago
|
||
So how can we make progress here?
Comment 21•8 years ago
|
||
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/656f2a934ccd
Part 1: Remove an unneeded inclusion from GeckoProfiler.h; r=mstange
https://hg.mozilla.org/integration/mozilla-inbound/rev/27fb70fdc744
Part 2: Move GeckoProfilerReporter to its own header; r=mstange
Comment 22•8 years ago
|
||
bugherder |
Comment 23•8 years ago
|
||
(In reply to :Ehsan Akhgari (super long backlog, slow to respond) from comment #20)
> So how can we make progress here?
Bug 1362894 has patches to make profiler_call_enter/exit inline again. Does that help with the build failures?
Assignee | ||
Comment 24•8 years ago
|
||
(In reply to Markus Stange [:mstange] from comment #23)
> (In reply to :Ehsan Akhgari (super long backlog, slow to respond) from
> comment #20)
> > So how can we make progress here?
>
> Bug 1362894 has patches to make profiler_call_enter/exit inline again. Does
> that help with the build failures?
Let me do another try push to find out.
Assignee | ||
Comment 25•8 years ago
|
||
(In reply to :Ehsan Akhgari (needinfo please, extremely long backlog) from comment #24)
> (In reply to Markus Stange [:mstange] from comment #23)
> > (In reply to :Ehsan Akhgari (super long backlog, slow to respond) from
> > comment #20)
> > > So how can we make progress here?
> >
> > Bug 1362894 has patches to make profiler_call_enter/exit inline again. Does
> > that help with the build failures?
>
> Let me do another try push to find out.
The try push:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=cdee917871f8692b606df3b3823d3a88ecb496b2
The error:
c:\builds\moz2_slave\try-w32-0000000000000000000000\build\src\obj-firefox\dist\include\GeckoProfiler.h(407): error C2492: 'sPseudoStack': data with thread storage duration may not have dll interface [log…]
Assignee | ||
Comment 26•8 years ago
|
||
I think I've fought the battle of making this macro work outside of libxul enough in this bug. It's time to file another bug to actually make this work properly first, and once (if) someone does that we can land this patch.
Comment 27•8 years ago
|
||
Parts 1 and 2 have landed. Part 3 is no longer needed because bug 1362894 did the same thing. And part 4 is no longer needed because I'm going to do it as the last part of bug 1370329.
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Keywords: leave-open
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Updated•8 years ago
|
Updated•8 years ago
|
Attachment #8865312 -
Attachment is obsolete: true
Updated•8 years ago
|
Attachment #8865313 -
Attachment is obsolete: true
You need to log in
before you can comment on or make changes to this bug.
Description
•