Bug 173450 - Use WTFLogAlways for debug logging so that it shows up in device system logs
Summary: Use WTFLogAlways for debug logging so that it shows up in device system logs
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-15 17:39 PDT by Simon Fraser (smfr)
Modified: 2017-07-06 14:13 PDT (History)
5 users (show)

See Also:


Attachments
Patch (61.86 KB, patch)
2017-06-15 17:42 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (24.17 KB, patch)
2017-07-06 11:55 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (24.31 KB, patch)
2017-07-06 13:56 PDT, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2017-06-15 17:39:36 PDT
Use WTFLogAlways for debug logging so that it shows up in device system logs
Comment 1 Simon Fraser (smfr) 2017-06-15 17:42:40 PDT
Created attachment 313034 [details]
Patch
Comment 2 Simon Fraser (smfr) 2017-06-15 18:43:42 PDT
https://trac.webkit.org/r218373
Comment 3 Ryosuke Niwa 2017-06-27 22:15:48 PDT
With this change, I can't make use of logging in Mac :( It has gotten way too verbose with all the timestamps and whatnot:

2017-06-27 22:15:37.245124-0700 DumpRenderTree[75864:10337285] BODY	0x11bd42548 (renderer 0x11bd76000)  (child needs style recalc)

BODY	0x11bd42548 (renderer 0x11bd76000)  (child needs style recalc)
2017-06-27 22:15:37.804742-0700 DumpRenderTree[75864:10337285] 	

	
2017-06-27 22:15:38.310601-0700 DumpRenderTree[75864:10337285] #text	0x11bd73410 "\n\n"

#text	0x11bd73410 "\n\n"
2017-06-27 22:15:38.783244-0700 DumpRenderTree[75864:10337285] 	

	
2017-06-27 22:15:39.300787-0700 DumpRenderTree[75864:10337285] INPUT	0x11bd6c380 (renderer 0x11bd1c290)  (needs style recalc) (child needs style recalc)

INPUT	0x11bd6c380 (renderer 0x11bd1c290)  (needs style recalc) (child needs style recalc)
2017-06-27 22:15:39.728353-0700 DumpRenderTree[75864:10337285] 		

		
2017-06-27 22:15:39.931333-0700 DumpRenderTree[75864:10337285] #document-fragment	0x11bdf8398 (renderer 0x0)  (needs style recalc) (child needs style recalc)

#document-fragment	0x11bdf8398 (renderer 0x0)  (needs style recalc) (child needs style recalc)
2017-06-27 22:15:40.099165-0700 DumpRenderTree[75864:10337285] 			

			
2017-06-27 22:15:40.249989-0700 DumpRenderTree[75864:10337285] DIV	0x11bd42618 (renderer 0x11bd0ba20)  (child needs style recalc)

DIV	0x11bd42618 (renderer 0x11bd0ba20)  (child needs style recalc)
2017-06-27 22:15:40.414241-0700 DumpRenderTree[75864:10337285] 				

				
2017-06-27 22:15:40.549323-0700 DumpRenderTree[75864:10337285] DIV	0x11bd426e8 (renderer 0x11bd76120) 

DIV	0x11bd426e8 (renderer 0x11bd76120)
Comment 4 Simon Fraser (smfr) 2017-06-27 22:16:46 PDT
Zalan was going to roll this out.

We really need to build the log with TextStream and log it in one go.
Comment 5 Ryosuke Niwa 2017-06-27 22:27:07 PDT
(In reply to Simon Fraser (smfr) from comment #4)
> Zalan was going to roll this out.
> 
> We really need to build the log with TextStream and log it in one go.

Yeah, that would do the trick. I gotta say I really hate all these noisy logs. I wonder if there's some environmental variable we can set to get rid of the timestamps, etc...?
Comment 6 zalan 2017-06-28 09:45:20 PDT
Reverted r218373 for reason:

Output is not right

Committed r218879: <http://trac.webkit.org/changeset/218879>
Comment 7 zalan 2017-07-06 11:55:03 PDT
Created attachment 314739 [details]
Patch
Comment 8 Simon Fraser (smfr) 2017-07-06 12:05:34 PDT
Comment on attachment 314739 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=314739&action=review

> Source/WebCore/rendering/InlineBox.cpp:119
> +    stream << boxName() << " " << FloatRect(x(), y(), width(), height()) << " (" << this << ") renderer->(" << &renderer() << ")";

I wonder if you should just add a TextStream& operator<<(TextStream&, const InlineBox&) that dumps this.

Does it make sense to add InlineBox::frameRect() or boxRect() that returns the rect?

> Source/WebCore/rendering/RenderObject.cpp:1032
> +    showRenderTreeLegend(stream);
> +    root->showRenderSubTreeAndMark(stream, this, 1);

The "show" in these names is misleading now.
Comment 9 zalan 2017-07-06 13:10:11 PDT
(In reply to Simon Fraser (smfr) from comment #8)
> Comment on attachment 314739 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=314739&action=review
> 
> > Source/WebCore/rendering/InlineBox.cpp:119
> > +    stream << boxName() << " " << FloatRect(x(), y(), width(), height()) << " (" << this << ") renderer->(" << &renderer() << ")";
> 
> I wonder if you should just add a TextStream& operator<<(TextStream&, const
> InlineBox&) that dumps this.
> 
> Does it make sense to add InlineBox::frameRect() or boxRect() that returns
> the rect?
I am planning to do that as part of the general InlineBox cleanup. 

> 
> > Source/WebCore/rendering/RenderObject.cpp:1032
> > +    showRenderTreeLegend(stream);
> > +    root->showRenderSubTreeAndMark(stream, this, 1);
> 
> The "show" in these names is misleading now.
ok.
Comment 10 zalan 2017-07-06 13:56:56 PDT
Created attachment 314755 [details]
Patch
Comment 11 WebKit Commit Bot 2017-07-06 14:13:27 PDT
Comment on attachment 314755 [details]
Patch

Clearing flags on attachment: 314755

Committed r219216: <http://trac.webkit.org/changeset/219216>
Comment 12 WebKit Commit Bot 2017-07-06 14:13:29 PDT
All reviewed patches have been landed.  Closing bug.