Last Comment Bug 763138 - Telemetry should indicate whether a debugger is attached
: Telemetry should indicate whether a debugger is attached
Status: RESOLVED FIXED
:
Product: Toolkit
Classification: Components
Component: Telemetry (show other bugs)
: Trunk
: x86_64 Windows 7
: -- normal (vote)
: mozilla16
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on: 1016631
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-08 19:32 PDT by Vladan Djeric (:vladan)
Modified: 2014-05-27 15:09 PDT (History)
7 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Report to Telemetry whether a debugger is attached (4.98 KB, patch)
2012-06-20 14:04 PDT, Vladan Djeric (:vladan)
taras.mozilla: feedback+
Details | Diff | Review
Report to Telemetry whether a debugger is attached (5.02 KB, patch)
2012-06-20 16:07 PDT, Vladan Djeric (:vladan)
benjamin: review+
smichaud: review+
vladan.bugzilla: checkin+
Details | Diff | Review

Description Vladan Djeric (:vladan) 2012-06-08 19:32:32 PDT
This would help prevent red herrings when investigating performance problems and chrome hangs. On Windows, this would be as simple as calling the IsDebuggerPresent method.
Comment 1 Vladan Djeric (:vladan) 2012-06-20 14:04:56 PDT
Created attachment 635059 [details] [diff] [review]
Report to Telemetry whether a debugger is attached
Comment 2 (dormant account) 2012-06-20 15:23:52 PDT
Comment on attachment 635059 [details] [diff] [review]
Report to Telemetry whether a debugger is attached

>+      gWasDebuggerPresent = debugService.isDebuggerPresent;

s/DebuggerPresent/DebuggerAttached/ everywhere in the patch sounds nicer to me.

>+
>+  if (sysctl(mib, mibSize, &info, &infoSize, NULL, 0)) {
>+    return NS_ERROR_FAILURE;

Don't do this, return NS_OK & false. This will cause telemetry to fail since there is no try/catch there. Afaik OSX stuff like this is implemented as IPC internally and will occasionally fail.
Comment 3 Vladan Djeric (:vladan) 2012-06-20 16:07:14 PDT
Created attachment 635110 [details] [diff] [review]
Report to Telemetry whether a debugger is attached

Applied Taras's comments
Comment 4 Benjamin Smedberg [:bsmedberg] 2012-06-28 08:53:23 PDT
Comment on attachment 635110 [details] [diff] [review]
Report to Telemetry whether a debugger is attached

requesting review from smichaud for the mac impl of nsDebugImpl::GetIsDebuggerAttached.
Comment 5 Steven Michaud [:smichaud] (Retired) 2012-06-28 09:20:23 PDT
Comment on attachment 635110 [details] [diff] [review]
Report to Telemetry whether a debugger is attached

Looks fine to me.
Comment 6 Vladan Djeric (:vladan) 2012-06-28 12:00:09 PDT
Comment on attachment 635110 [details] [diff] [review]
Report to Telemetry whether a debugger is attached

https://hg.mozilla.org/integration/mozilla-inbound/rev/23d9d354236e
Comment 7 Ed Morley [:emorley] 2012-06-29 00:47:34 PDT
https://hg.mozilla.org/mozilla-central/rev/23d9d354236e

Note You need to log in before you can comment on or make changes to this bug.