Closed
Bug 853358
Opened 12 years ago
Closed 12 years ago
Add plugin profiling support
Categories
(Core :: Gecko Profiler, defect)
Tracking
()
RESOLVED
FIXED
mozilla23
People
(Reporter: BenWa, Assigned: BenWa)
References
Details
Attachments
(1 file, 5 obsolete files)
21.27 KB,
patch
|
BenWa
:
review+
|
Details | Diff | Splinter Review |
Currently when we want to do multi-process profiling we contact and signal each process manually and run a script to combine the profiling. It should be easy to use an IPC message to do this ourselves.
Assignee | ||
Comment 1•12 years ago
|
||
Asking ehsan for profiler changes, benjamin for plugins.
Assignee | ||
Updated•12 years ago
|
Attachment #727571 -
Flags: review?(ehsan)
Comment 2•12 years ago
|
||
Comment on attachment 727571 [details] [diff] [review]
patch
Review of attachment 727571 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/plugins/ipc/PluginModuleParent.cpp
@@ +1738,5 @@
> +PluginProfilerObserver::Observe(nsISupports *aSubject,
> + const char *aTopic,
> + const PRUnichar *aData)
> +{
> + ProfileSaveEvent* pse = (ProfileSaveEvent*)aSubject;
No, you cannot guarantee that this will be safe since anyone can send this notification. Please add an XPCOM interface and implement it properly.
::: tools/profiler/GeckoProfilerImpl.h
@@ +295,5 @@
> }
> stack->addMarker(aMarker);
> }
>
> +class ProfileSaveEvent MOZ_FINAL : public nsISupports {
Please move this to TableTicker.cpp.
::: tools/profiler/TableTicker.cpp
@@ +167,5 @@
> + JSAObjectBuilder* mBuilder;
> + JSCustomArray* mThreads;
> +};
> +
> +void subprocess_callback(const char* aProfile, void* aClosure)
Nit: SubProcessCallback
@@ +207,5 @@
> + closure.mThreads = threads;
> +
> + nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
> + if (os) {
> + os->NotifyObservers(new ProfileSaveEvent(subprocess_callback, &closure), "profiler-subprocess", nullptr);
ProfileSaveEvent is an XPCOM class, so you should hold on to it in a local nsRefPtr. Otherwise, if an Observe implementation puts it into an nsCOMPtr, for example, the object will be destroyed prematurely when that nsCOMPtr is destroyed (since Release gets called which gets the refcount to 0.)
Attachment #727571 -
Flags: review?(ehsan) → review-
Assignee | ||
Comment 3•12 years ago
|
||
Attachment #727571 -
Attachment is obsolete: true
Attachment #727571 -
Flags: review?(benjamin)
Attachment #729556 -
Flags: review?(ehsan)
Comment 4•12 years ago
|
||
Comment on attachment 729556 [details] [diff] [review]
patch
Review of attachment 729556 [details] [diff] [review]:
-----------------------------------------------------------------
Can you please ask somebody else to look at the plugin changes? I'll try to get to this review some time this week but that may not be very likely. Sorry. :(
Assignee | ||
Comment 5•12 years ago
|
||
Comment on attachment 729556 [details] [diff] [review]
patch
Yes, I just wanted to let you get a first pass before asking for the plugin bits to be reviewed.
Attachment #729556 -
Flags: review?(benjamin)
Comment 6•12 years ago
|
||
Comment on attachment 729556 [details] [diff] [review]
patch
I wonder if it wouldn't make more sense to write the profile to a temporary file. But either way, r=me on the plugin bits
Attachment #729556 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 7•12 years ago
|
||
(In reply to Benjamin Smedberg [:bsmedberg] from comment #6)
> Comment on attachment 729556 [details] [diff] [review]
> patch
>
> I wonder if it wouldn't make more sense to write the profile to a temporary
> file.
Have the plugin process write it's data to a file and have the parent process load it back up? It feels like that would be more flaky.
Comment 8•12 years ago
|
||
Comment on attachment 729556 [details] [diff] [review]
patch
Review of attachment 729556 [details] [diff] [review]:
-----------------------------------------------------------------
::: tools/profiler/Makefile.in
@@ +47,5 @@
> platform.cpp \
> nsProfilerFactory.cpp \
> nsProfiler.cpp \
> TableTicker.cpp \
> + SaveProfileTask.cpp \
Nit: use spaces please.
Attachment #729556 -
Flags: review?(ehsan) → review+
Assignee | ||
Comment 9•12 years ago
|
||
Attachment #729556 -
Attachment is obsolete: true
Attachment #735365 -
Flags: review+
Assignee | ||
Comment 10•12 years ago
|
||
Attachment #735365 -
Attachment is obsolete: true
Assignee | ||
Comment 11•12 years ago
|
||
Assignee | ||
Comment 12•12 years ago
|
||
(patch queue had a bad patch inside of it):
https://tbpl.mozilla.org/?tree=Try&rev=0f89c96118c1
Assignee | ||
Comment 13•12 years ago
|
||
non trivial rebase again:
https://tbpl.mozilla.org/?tree=Try&rev=c90e6080f55a
Attachment #735401 -
Attachment is obsolete: true
Attachment #741150 -
Flags: review+
Assignee | ||
Comment 14•12 years ago
|
||
Attachment #741150 -
Attachment is obsolete: true
Attachment #741427 -
Flags: review+
Assignee | ||
Comment 15•12 years ago
|
||
Comment on attachment 741427 [details] [diff] [review]
patch rebased again
I never got review on the plugin part.
Attachment #741427 -
Flags: review?(benjamin)
Assignee | ||
Comment 16•12 years ago
|
||
Comment on attachment 741427 [details] [diff] [review]
patch rebased again
Didn't see that I already got review.
Attachment #741427 -
Flags: review?(benjamin)
Assignee | ||
Comment 17•12 years ago
|
||
Comment 18•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in
before you can comment on or make changes to this bug.
Description
•