Skip to content

Commit

Permalink
Bug 1281793 - Remove some non-used telemetry IDs - part 1 - expired k…
Browse files Browse the repository at this point in the history
…eys in nsBrowserApp, r=gfritzsche
  • Loading branch information
bakulf committed Jun 28, 2016
1 parent 7fc6053 commit 880aca8
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 134 deletions.
37 changes: 0 additions & 37 deletions b2g/app/nsBrowserApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,17 +215,6 @@ int main(int argc, _CONST char* argv[])
(void)setsid();
#endif

int gotCounters;
#if defined(XP_UNIX)
struct rusage initialRUsage;
gotCounters = !getrusage(RUSAGE_SELF, &initialRUsage);
#elif defined(XP_WIN)
IO_COUNTERS ioCounters;
gotCounters = GetProcessIoCounters(GetCurrentProcess(), &ioCounters);
#else
#error "Unknown platform" // having this here keeps cppcheck happy
#endif

#ifdef HAS_DLL_BLOCKLIST
DllBlocklist_Initialize();
#endif
Expand All @@ -251,32 +240,6 @@ int main(int argc, _CONST char* argv[])
return 255;
}

if (gotCounters) {
#if defined(XP_WIN)
XRE_TelemetryAccumulate(mozilla::Telemetry::EARLY_GLUESTARTUP_READ_OPS,
int(ioCounters.ReadOperationCount));
XRE_TelemetryAccumulate(mozilla::Telemetry::EARLY_GLUESTARTUP_READ_TRANSFER,
int(ioCounters.ReadTransferCount / 1024));
IO_COUNTERS newIoCounters;
if (GetProcessIoCounters(GetCurrentProcess(), &newIoCounters)) {
XRE_TelemetryAccumulate(mozilla::Telemetry::GLUESTARTUP_READ_OPS,
int(newIoCounters.ReadOperationCount - ioCounters.ReadOperationCount));
XRE_TelemetryAccumulate(mozilla::Telemetry::GLUESTARTUP_READ_TRANSFER,
int((newIoCounters.ReadTransferCount - ioCounters.ReadTransferCount) / 1024));
}
#elif defined(XP_UNIX)
XRE_TelemetryAccumulate(mozilla::Telemetry::EARLY_GLUESTARTUP_HARD_FAULTS,
int(initialRUsage.ru_majflt));
struct rusage newRUsage;
if (!getrusage(RUSAGE_SELF, &newRUsage)) {
XRE_TelemetryAccumulate(mozilla::Telemetry::GLUESTARTUP_HARD_FAULTS,
int(newRUsage.ru_majflt - initialRUsage.ru_majflt));
}
#else
#error "Unknown platform" // having this here keeps cppcheck happy
#endif
}

int result;
{
ScopedLogging log;
Expand Down
37 changes: 0 additions & 37 deletions browser/app/nsBrowserApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,17 +362,6 @@ int main(int argc, char* argv[], char* envp[])
TriggerQuirks();
#endif

int gotCounters;
#if defined(XP_UNIX)
struct rusage initialRUsage;
gotCounters = !getrusage(RUSAGE_SELF, &initialRUsage);
#elif defined(XP_WIN)
IO_COUNTERS ioCounters;
gotCounters = GetProcessIoCounters(GetCurrentProcess(), &ioCounters);
#else
#error "Unknown platform" // having this here keeps cppcheck happy
#endif

nsIFile *xreDirectory;

#ifdef HAS_DLL_BLOCKLIST
Expand All @@ -394,32 +383,6 @@ int main(int argc, char* argv[], char* envp[])

XRE_StartupTimelineRecord(mozilla::StartupTimeline::START, start);

if (gotCounters) {
#if defined(XP_WIN)
XRE_TelemetryAccumulate(mozilla::Telemetry::EARLY_GLUESTARTUP_READ_OPS,
int(ioCounters.ReadOperationCount));
XRE_TelemetryAccumulate(mozilla::Telemetry::EARLY_GLUESTARTUP_READ_TRANSFER,
int(ioCounters.ReadTransferCount / 1024));
IO_COUNTERS newIoCounters;
if (GetProcessIoCounters(GetCurrentProcess(), &newIoCounters)) {
XRE_TelemetryAccumulate(mozilla::Telemetry::GLUESTARTUP_READ_OPS,
int(newIoCounters.ReadOperationCount - ioCounters.ReadOperationCount));
XRE_TelemetryAccumulate(mozilla::Telemetry::GLUESTARTUP_READ_TRANSFER,
int((newIoCounters.ReadTransferCount - ioCounters.ReadTransferCount) / 1024));
}
#elif defined(XP_UNIX)
XRE_TelemetryAccumulate(mozilla::Telemetry::EARLY_GLUESTARTUP_HARD_FAULTS,
int(initialRUsage.ru_majflt));
struct rusage newRUsage;
if (!getrusage(RUSAGE_SELF, &newRUsage)) {
XRE_TelemetryAccumulate(mozilla::Telemetry::GLUESTARTUP_HARD_FAULTS,
int(newRUsage.ru_majflt - initialRUsage.ru_majflt));
}
#else
#error "Unknown platform" // having this here keeps cppcheck happy
#endif
}

#ifdef MOZ_BROWSER_CAN_BE_CONTENTPROC
XRE_EnableSameExecutableForContentProc();
#endif
Expand Down
54 changes: 0 additions & 54 deletions toolkit/components/telemetry/Histograms.json
Original file line number Diff line number Diff line change
Expand Up @@ -775,60 +775,6 @@
"description": "Number of low-commit-space events fired since last ping",
"cpp_guard": "XP_WIN"
},
"EARLY_GLUESTARTUP_READ_OPS": {
"alert_emails": ["[email protected]"],
"expires_in_version": "40",
"kind": "linear",
"high": 100,
"n_buckets": 12,
"description": "ProcessIoCounters.ReadOperationCount before glue startup *** No longer needed (bug 1156565). Delete histogram and accumulation code! ***",
"cpp_guard": "XP_WIN"
},
"EARLY_GLUESTARTUP_READ_TRANSFER": {
"alert_emails": ["[email protected]"],
"expires_in_version": "40",
"kind": "exponential",
"high": 51200,
"n_buckets": 12,
"description": "ProcessIoCounters.ReadTransferCount before glue startup (KB) *** No longer needed (bug 1156565). Delete histogram and accumulation code! ***",
"cpp_guard": "XP_WIN"
},
"GLUESTARTUP_READ_OPS": {
"alert_emails": ["[email protected]"],
"expires_in_version": "40",
"kind": "linear",
"high": 100,
"n_buckets": 12,
"description": "ProcessIoCounters.ReadOperationCount after glue startup *** No longer needed (bug 1156565). Delete histogram and accumulation code! ***",
"cpp_guard": "XP_WIN"
},
"GLUESTARTUP_READ_TRANSFER": {
"alert_emails": ["[email protected]"],
"expires_in_version": "40",
"kind": "exponential",
"high": 51200,
"n_buckets": 12,
"description": "ProcessIoCounters.ReadTransferCount after glue startup (KB) *** No longer needed (bug 1156565). Delete histogram and accumulation code! ***",
"cpp_guard": "XP_WIN"
},
"EARLY_GLUESTARTUP_HARD_FAULTS": {
"alert_emails": ["[email protected]"],
"expires_in_version": "40",
"kind": "linear",
"high": 100,
"n_buckets": 12,
"description": "Hard faults count before glue startup *** No longer needed (bug 1156565). Delete histogram and accumulation code! ***",
"cpp_guard": "XP_UNIX"
},
"GLUESTARTUP_HARD_FAULTS": {
"alert_emails": ["[email protected]"],
"expires_in_version": "40",
"kind": "exponential",
"high": 500,
"n_buckets": 12,
"description": "Hard faults count after glue startup *** No longer needed (bug 1156565). Delete histogram and accumulation code! ***",
"cpp_guard": "XP_UNIX"
},
"PAGE_FAULTS_HARD": {
"expires_in_version": "default",
"kind": "exponential",
Expand Down
6 changes: 0 additions & 6 deletions toolkit/components/telemetry/histogram-whitelists.json
Original file line number Diff line number Diff line change
Expand Up @@ -1501,9 +1501,6 @@
"E10S_BLOCKED_FROM_RUNNING",
"E10S_STILL_ACCEPTED_FROM_PROMPT",
"E10S_WINDOW",
"EARLY_GLUESTARTUP_HARD_FAULTS",
"EARLY_GLUESTARTUP_READ_OPS",
"EARLY_GLUESTARTUP_READ_TRANSFER",
"ENABLE_PRIVILEGE_EVER_CALLED",
"FENNEC_DISTRIBUTION_CODE_CATEGORY",
"FENNEC_DISTRIBUTION_DOWNLOAD_TIME_MS",
Expand Down Expand Up @@ -1644,9 +1641,6 @@
"GFX_CONTENT_FAILED_TO_ACQUIRE_DEVICE",
"GFX_CRASH",
"GHOST_WINDOWS",
"GLUESTARTUP_HARD_FAULTS",
"GLUESTARTUP_READ_OPS",
"GLUESTARTUP_READ_TRANSFER",
"GRADIENT_DURATION",
"GRADIENT_RETENTION_TIME",
"GRAPHICS_DRIVER_STARTUP_TEST",
Expand Down

0 comments on commit 880aca8

Please sign in to comment.