Граф коммитов

86 Коммитов

Автор SHA1 Сообщение Дата
Michael Layzell 061c6a26b0 Bug 1367406 - Part 3: Expose computed modules through .modules getter, r=froydnj
MozReview-Commit-ID: F6aDnlwr9jt
2017-08-16 11:44:05 -04:00
Michael Layzell 148f1a81e4 Bug 1367406 - Part 2: Add a method for reading module information for native stack frames, r=froydnj
MozReview-Commit-ID: 7gzFhygwXx4
2017-08-16 11:44:04 -04:00
Michael Layzell 849025c0d6 Bug 1367406 - Part 1: Add interleaved stack functionality to HangStack, r=froydnj
- This patch was written in 3 interdependent parts, which are described below -

Part 1A: Allow HangStack to contain raw PCs and Module offsets, r=froydnj

The HangStack previously consisted of an array of const char* pointers into its
backing string buffer, which represented pseudostack entries. With interleaved
stacks, it is now possible for the stack to contain raw unresolved program
counters (Kind::PC), and module/offset pairs (Kind::MODOFFSET). To do this, we
use a discriminated union, and make the backing array use the discriminated
union instead of const char*s.

The code cannot use mozilla::Variant<const char*, uintptr_t, Module>
unfortuantely, as we cannot use the implementation of ParamTraits for Variant in
HangStack's ParamTraits implementation.

When deserializing a HangStack over IPC, we need to read the string frame
entries into the backing string buffer, and generate const char* entries for
each of the strings which we read in over IPC. The default implementation of
ParamTraits wouldn't give us access to the enclusing HangStack object while
deserializing each individual entry, so we couldn't use it. In fact, Entries
don't have ParamTraits implemented for them at all, and can only be sent over
IPC as part of a HangStack due to this dependency.

Part 1B: Remove nsIHangDetails.pseudoStack, replace ProcessedStack w/ new HangStack type, r=froydnj

Previously there were two stack objects on each HangDetails object: mStack and
mPseudoStack. mStack was a Telemetry::ProcessedStack, while mPseudoStack was a
HangStack. After the changes in part 1A, HangStack can now contain all of the
information of both the old HangStack and ProcessedStack, so the mPseudoStack
field is renamed to mStack, and the old mStack field is removed.

This patch also implements the new GetStack getter, which generates the JS data
format for the new HangStack type.

Part 1C: Collect interleaved stacks w/ ProfilerStackCollector API in ThreadStackHelper, r=froydnj

This new API was added by njn in bug 1380286, and provides both pseudostack and
native stack entries to the consumer of the API.

This patch changes ThreadStackHelper to use this new API instead of the previous
one, and use it to collect the frames directly into HangStack objects.
2017-08-16 11:44:02 -04:00
Michael Layzell 776ffc2b29 Bug 1386369 - Part 2: Stop emitting bhr-thread-hang in the content process, r=froydnj
MozReview-Commit-ID: 1A7CorZepdQ
2017-08-15 16:36:26 -04:00
Michael Layzell c8a848329d Bug 1386369 - Part 1: Change test_BHRObserver to not listen to bhr-thread-hang in content, r=froydnj
MozReview-Commit-ID: 7nFBdtiXFc2
2017-08-15 16:36:24 -04:00
Michael Layzell 4c4a03953d Bug 1380081 - Part 15: Don't try to submit bhr ping to telemetry while running tests, r=chutten 2017-08-15 16:36:22 -04:00
Michael Layzell 7f649507e9 Bug 1380081 - Part 14: Include BHRTelemetryService and xpt files in the package, r=froydnj
MozReview-Commit-ID: IH56INaSOoK
2017-08-15 16:35:52 -04:00
Michael Layzell f2ee64a153 Bug 1380081 - Part 12: Add a test for BHR observer notifications, r=froydnj
This patch just adds some tests for the new stuff which we added.

MozReview-Commit-ID: 2jG75AEUJfS
2017-08-15 16:35:48 -04:00
Michael Layzell 65ece3dba5 Bug 1380081 - Part 11: Simplify the HangAnnotations abstraction, r=froydnj
HangAnnotations was very complex, required a separate allocation, and used this
unfortunate virtual interface implementation which made it harder to do
interesting things with it (such as serialize it over IPC).

This new implementation is much simpler and more concrete, making
HangAnnotations simply be a nsTArray<Annotation>. This also simplifies some of
the IPC code which was added in part 7.

MozReview-Commit-ID: EzaaxdHpW1t
2017-08-15 16:35:46 -04:00
Michael Layzell 871e8c097f Bug 1380081 - Part 10: Stop running BHR on beta, r=froydnj
These changes are going to increase the amount of data which we collect from BHR
a lot. It would be dangerous to run it on beta, especially considering how soon
the next merge is.

This should turn it off for 100% of beta users if I understand the logic
correctly.

MozReview-Commit-ID: 3HyEKWdXaqU
2017-08-15 16:35:44 -04:00
Michael Layzell 5d81a3b535 Bug 1380081 - Part 9: Transmit BHR Hangs from the Content and GPU process to the parent process, r=froydnj
BHRTelemetryService only runs in the parent process (and we can only submit
pings from there), so we need to send the data which we collect in the GPU and
Content processes over IPC to the parent process.

MozReview-Commit-ID: 8B5uZKbjNbU
2017-08-15 16:35:42 -04:00
Michael Layzell 116cbfd0dc Bug 1380081 - Part 8: Report bhr-thread-hang hangs to telemetry in a custom bhr ping, r=froydnj
This patch adds the BHRTelemetryService which is a JS implemented XPCOM service
that simply listens to the bhr-thread-hang observer notification, and uses the
data it collects from it to submit telemetry pings.

MozReview-Commit-ID: 2hPXAFmHrm5
2017-08-15 16:35:41 -04:00
Michael Layzell 82b2097078 Bug 1380081 - Part 7: Add all necessary data for BHR to nsIHangDetails, r=froydnj
We're going to use HangDetails as the type containing hang information. We'll
have a JS component which reads the data out of nsIHangDetails, builds the
payload, and submits it to telemetry for us.

We'll do it in JS because telemetry has to be submitted from JS.

This patch also adds IPC serization for the relevant types so that we can send
HangDetails objects over IPDL.

MozReview-Commit-ID: CeikKabY9Vs
2017-08-15 16:35:39 -04:00
Michael Layzell b7564c8ece Bug 1380081 - Part 4: Move BHR into its own component, r=froydnj
MozReview-Commit-ID: 7TOGofAYM6W


--HG--
rename : xpcom/threads/BackgroundHangMonitor.cpp => toolkit/components/backgroundhangmonitor/BackgroundHangMonitor.cpp
rename : xpcom/threads/BackgroundHangMonitor.h => toolkit/components/backgroundhangmonitor/BackgroundHangMonitor.h
rename : toolkit/components/telemetry/ThreadHangStats.h => toolkit/components/backgroundhangmonitor/ThreadHangStats.h
rename : xpcom/threads/ThreadStackHelper.cpp => toolkit/components/backgroundhangmonitor/ThreadStackHelper.cpp
rename : xpcom/threads/ThreadStackHelper.h => toolkit/components/backgroundhangmonitor/ThreadStackHelper.h
rename : xpcom/threads/nsIHangDetails.idl => toolkit/components/backgroundhangmonitor/nsIHangDetails.idl
2017-08-15 16:35:00 -04:00
Sebastian Hengst ebcb175d14 Backed out changeset 68bec6464338 (bug 1380081)
--HG--
rename : toolkit/components/backgroundhangmonitor/ThreadHangStats.h => toolkit/components/telemetry/ThreadHangStats.h
rename : toolkit/components/backgroundhangmonitor/BackgroundHangMonitor.cpp => xpcom/threads/BackgroundHangMonitor.cpp
rename : toolkit/components/backgroundhangmonitor/BackgroundHangMonitor.h => xpcom/threads/BackgroundHangMonitor.h
rename : toolkit/components/backgroundhangmonitor/ThreadStackHelper.cpp => xpcom/threads/ThreadStackHelper.cpp
rename : toolkit/components/backgroundhangmonitor/ThreadStackHelper.h => xpcom/threads/ThreadStackHelper.h
rename : toolkit/components/backgroundhangmonitor/nsIHangDetails.idl => xpcom/threads/nsIHangDetails.idl
2017-08-11 09:28:42 +02:00
Sebastian Hengst 9f41dbabdb Backed out changeset 6bc453505dc3 (bug 1380081) 2017-08-11 09:28:27 +02:00
Sebastian Hengst 0cf98602ac Backed out changeset 8d0b5e469b69 (bug 1380081) 2017-08-11 09:28:21 +02:00
Sebastian Hengst 41113ae3fc Backed out changeset 0b6c4c95323e (bug 1380081) 2017-08-11 09:28:16 +02:00
Sebastian Hengst 8e97249c63 Backed out changeset d34e59a86079 (bug 1380081) 2017-08-11 09:28:11 +02:00
Sebastian Hengst 3547a3cd0e Backed out changeset 9158ca4292bb (bug 1380081) 2017-08-11 09:28:06 +02:00
Sebastian Hengst 1ecdd0e372 Backed out changeset cc4253078c54 (bug 1380081) 2017-08-11 09:28:01 +02:00
Sebastian Hengst bcc1658ce3 Backed out changeset 6bca45190947 (bug 1380081) 2017-08-11 09:27:51 +02:00
Sebastian Hengst cd040169ea Backed out changeset 51516e2306a4 (bug 1386369) 2017-08-11 09:27:46 +02:00
Sebastian Hengst a0866d273a Backed out changeset 272d38101267 (bug 1386369) 2017-08-11 09:27:41 +02:00
Sebastian Hengst ee62c91674 Backed out changeset 56f67af11f80 (bug 1386369) 2017-08-11 09:27:36 +02:00
Michael Layzell 6218cf0a78 Bug 1386369 - Part 3: Use double quotes for strings, a=eslint-bustage
MozReview-Commit-ID: LYVrPDQ81LU
2017-08-10 16:12:40 -04:00
Michael Layzell e71c9dc873 Bug 1386369 - Part 2: Stop emitting bhr-thread-hang in the content process, r=froydnj
MozReview-Commit-ID: 1A7CorZepdQ
2017-08-10 15:55:12 -04:00
Michael Layzell 7a1d4b474f Bug 1386369 - Part 1: Change test_BHRObserver to not listen to bhr-thread-hang in content, r=froydnj
MozReview-Commit-ID: 7nFBdtiXFc2
2017-08-10 15:55:12 -04:00
Michael Layzell 918756632e Bug 1380081 - Part 14: Include BHRTelemetryService and xpt files in the package, r=froydnj
MozReview-Commit-ID: IH56INaSOoK
2017-08-10 15:55:12 -04:00
Michael Layzell 6c6b6aa2cb Bug 1380081 - Part 12: Add a test for BHR observer notifications, r=froydnj
This patch just adds some tests for the new stuff which we added.

MozReview-Commit-ID: 2jG75AEUJfS
2017-08-10 15:55:12 -04:00
Michael Layzell e51c323738 Bug 1380081 - Part 11: Simplify the HangAnnotations abstraction, r=froydnj
HangAnnotations was very complex, required a separate allocation, and used this
unfortunate virtual interface implementation which made it harder to do
interesting things with it (such as serialize it over IPC).

This new implementation is much simpler and more concrete, making
HangAnnotations simply be a nsTArray<Annotation>. This also simplifies some of
the IPC code which was added in part 7.

MozReview-Commit-ID: EzaaxdHpW1t
2017-08-10 15:55:12 -04:00
Michael Layzell 3e6981de22 Bug 1380081 - Part 10: Stop running BHR on beta, r=froydnj
These changes are going to increase the amount of data which we collect from BHR
a lot. It would be dangerous to run it on beta, especially considering how soon
the next merge is.

This should turn it off for 100% of beta users if I understand the logic
correctly.

MozReview-Commit-ID: 3HyEKWdXaqU
2017-08-10 15:55:12 -04:00
Michael Layzell 9175dce461 Bug 1380081 - Part 9: Transmit BHR Hangs from the Content and GPU process to the parent process, r=froydnj
BHRTelemetryService only runs in the parent process (and we can only submit
pings from there), so we need to send the data which we collect in the GPU and
Content processes over IPC to the parent process.

MozReview-Commit-ID: 8B5uZKbjNbU
2017-08-10 15:55:12 -04:00
Michael Layzell b10326b7fd Bug 1380081 - Part 8: Report bhr-thread-hang hangs to telemetry in a custom bhr ping, r=froydnj
This patch adds the BHRTelemetryService which is a JS implemented XPCOM service
that simply listens to the bhr-thread-hang observer notification, and uses the
data it collects from it to submit telemetry pings.

MozReview-Commit-ID: 2hPXAFmHrm5
2017-08-10 15:55:12 -04:00
Michael Layzell 49ede48e96 Bug 1380081 - Part 7: Add all necessary data for BHR to nsIHangDetails, r=froydnj
We're going to use HangDetails as the type containing hang information. We'll
have a JS component which reads the data out of nsIHangDetails, builds the
payload, and submits it to telemetry for us.

We'll do it in JS because telemetry has to be submitted from JS.

This patch also adds IPC serization for the relevant types so that we can send
HangDetails objects over IPDL.

MozReview-Commit-ID: CeikKabY9Vs
2017-08-10 15:55:12 -04:00
Michael Layzell ee7272fb92 Bug 1380081 - Part 4: Move BHR into its own component, r=froydnj
MozReview-Commit-ID: 7TOGofAYM6W


--HG--
rename : xpcom/threads/BackgroundHangMonitor.cpp => toolkit/components/backgroundhangmonitor/BackgroundHangMonitor.cpp
rename : xpcom/threads/BackgroundHangMonitor.h => toolkit/components/backgroundhangmonitor/BackgroundHangMonitor.h
rename : toolkit/components/telemetry/ThreadHangStats.h => toolkit/components/backgroundhangmonitor/ThreadHangStats.h
rename : xpcom/threads/ThreadStackHelper.cpp => toolkit/components/backgroundhangmonitor/ThreadStackHelper.cpp
rename : xpcom/threads/ThreadStackHelper.h => toolkit/components/backgroundhangmonitor/ThreadStackHelper.h
rename : xpcom/threads/nsIHangDetails.idl => toolkit/components/backgroundhangmonitor/nsIHangDetails.idl
2017-08-10 15:55:12 -04:00