Last Comment Bug 774271 - improve DNS logging
: improve DNS logging
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Networking: DNS (show other bugs)
: Trunk
: x86 Mac OS X
: -- normal (vote)
: mozilla17
Assigned To: Josh Aas
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-16 07:27 PDT by Josh Aas
Modified: 2012-07-17 02:12 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
fix v1.0 (11.76 KB, patch)
2012-07-16 07:27 PDT, Josh Aas
sworkman: review+
Details | Diff | Review

Description Josh Aas 2012-07-16 07:27:05 PDT
Created attachment 642578 [details] [diff] [review]
fix v1.0

I'd like to make some modest improvements to DNS logging.
Comment 1 Steve Workman [:sworkman] (please use needinfo) 2012-07-16 08:14:47 PDT
Comment on attachment 642578 [details] [diff] [review]
fix v1.0

Review of attachment 642578 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good. r=me.

::: netwerk/dns/nsHostResolver.cpp
@@ +950,5 @@
>  
>  void
>  nsHostResolver::ThreadFunc(void *arg)
>  {
> +    LOG(("DNS lookup thread starting execution.\n"));

Would it be overkill to get the thread id (PR_GetThreadID) for the logs in ThreadFunc? Called functions don't look like they have logs.
Comment 2 Christian :Biesinger (don't email me, ping me on IRC) 2012-07-16 15:37:06 PDT
PR_LOG adds the thread id in its output, doesn't it?
Comment 3 Steve Workman [:sworkman] (please use needinfo) 2012-07-16 15:39:51 PDT
Oh! That's what that is :) Then never mind what I wrote.
Comment 5 Christian :Biesinger (don't email me, ping me on IRC) 2012-07-16 15:46:29 PDT
:-) See http://mxr.mozilla.org/mozilla-central/source/nsprpub/pr/src/io/prlog.c#456

The first number is the PRThread->id, the second number is the PRThread*. I believe that makes the first number the OS thread ID.
Comment 6 Steve Workman [:sworkman] (please use needinfo) 2012-07-16 15:48:28 PDT
Thanks Christian :)
Comment 7 Ed Morley [:emorley] 2012-07-17 02:12:02 PDT
https://hg.mozilla.org/mozilla-central/rev/7fe11a265ac5

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