Bug 1299773: Added rendering of symbolicated stacks. r?gfritzsche
MozReview-Commit-ID: 5WCliZkuaY3
--- a/toolkit/content/aboutTelemetry.js
+++ b/toolkit/content/aboutTelemetry.js
@@ -1122,19 +1122,27 @@ var CapturedStacks = {
capturedStacks.stacks.length > 0;
setHasData("captured-stacks-section", hasData);
if (!hasData) {
return;
}
let stacks = capturedStacks.stacks;
let memoryMap = capturedStacks.memoryMap;
+ let captures = capturedStacks.captures;
- StackRenderer.renderStacks("captured-stacks", stacks, memoryMap, () => {});
+ StackRenderer.renderStacks("captured-stacks", stacks, memoryMap,
+ (index) => this.renderCaptureHeader(index, captures));
},
+
+ renderCaptureHeader: function CaptureStacks_renderCaptureHeader(index, captures) {
+ let key = captures[index][0];
+ let cardinality = captures[index][2];
+ StackRenderer.renderHeader("captured-stacks", [key, cardinality]);
+ }
};
var ThreadHangStats = {
/**
* Renders raw thread hang stats data
*/
render(aPayload) {
@@ -1830,30 +1838,28 @@ function setupListeners() {
document.getElementById("captured-stacks-fetch-symbols").addEventListener("click",
function() {
if (!gPingData) {
return;
}
let capturedStacks = gPingData.payload.processes.parent.capturedStacks;
let req = new SymbolicationRequest("captured-stacks",
- CapturedStacks.render,
+ CapturedStacks.renderCaptureHeader,
capturedStacks.memoryMap,
capturedStacks.stacks,
- null);
+ capturedStacks.captures);
req.fetchSymbols();
});
document.getElementById("captured-stacks-hide-symbols").addEventListener("click",
function() {
- if (!gPingData) {
- return;
+ if (gPingData) {
+ CapturedStacks.render(gPingData.payload);
}
-
- CapturedStacks.render(gPingData);
});
document.getElementById("late-writes-fetch-symbols").addEventListener("click",
function() {
if (!gPingData) {
return;
}
--- a/toolkit/locales/en-US/chrome/global/aboutTelemetry.dtd
+++ b/toolkit/locales/en-US/chrome/global/aboutTelemetry.dtd
@@ -152,21 +152,21 @@ Ping
(No data collected)
">
<!ENTITY aboutTelemetry.fullSqlWarning "
NOTE: Slow SQL debugging is enabled. Full SQL strings may be displayed below but they will not be submitted to Telemetry.
">
<!ENTITY aboutTelemetry.fetchSymbols "
- Fetch function names for hang stacks
+ Fetch function names for stacks
">
<!ENTITY aboutTelemetry.hideSymbols "
- Show raw data from hangs
+ Show raw stack data
">
<!ENTITY aboutTelemetry.filterText "
Filter (strings or /regexp/)
">
<!ENTITY aboutTelemetry.payloadChoiceHeader "
Payload
--- a/toolkit/locales/en-US/chrome/global/aboutTelemetry.properties
+++ b/toolkit/locales/en-US/chrome/global/aboutTelemetry.properties
@@ -40,16 +40,21 @@ slowSqlAverage = Avg. Time (ms)
slowSqlStatement = Statement
# Note to translators:
# - The %1$S will be replaced with the number of the hang
# - The %2$S will be replaced with the duration of the hang
chrome-hangs-title = Hang Report #%1$S (%2$S seconds)
# Note to translators:
+# - The %1$S will be replaced with the string key for this stack.
+# - The %2$S will be replaced with the number of times this stack was captured.
+captured-stacks-title = %1$S (capture count: %2$S)
+
+# Note to translators:
# - The %1$S will be replaced with the number of the late write
late-writes-title = Late Write #%1$S
stackTitle = Stack:
memoryMapTitle = Memory map:
errorFetchingSymbols = An error occurred while fetching symbols. Check that you are connected to the Internet and try again.