Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Issue 886233004: Print gpu/cache stats from DM. (Closed)

Created:
5 years, 10 months ago by bsalomon
Modified:
5 years, 10 months ago
Reviewers:
mtklein, robertphillips
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Print gpu/cache stats from DM.

Patch Set 1 #

Patch Set 2 : minor #

Patch Set 3 : minor #

Total comments: 5

Patch Set 4 : revert DM changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+156 lines, -143 lines) Patch
M include/gpu/GrContext.h View 1 2 3 1 chunk +5 lines, -25 lines 0 comments Download
M src/gpu/GrContext.cpp View 1 2 3 1 chunk +0 lines, -13 lines 0 comments Download
M src/gpu/GrGpu.h View 7 chunks +54 lines, -39 lines 0 comments Download
M src/gpu/GrResourceCache2.h View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M src/gpu/GrResourceCache2.cpp View 1 2 3 1 chunk +0 lines, -40 lines 0 comments Download
M src/gpu/GrTest.cpp View 1 2 2 chunks +74 lines, -0 lines 0 comments Download
M src/gpu/gl/GrGLGpu.cpp View 9 chunks +10 lines, -10 lines 0 comments Download
M src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/gl/builders/GrGLGeometryShaderBuilder.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/gl/builders/GrGLShaderStringBuilder.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/gpu/gl/builders/GrGLShaderStringBuilder.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp View 1 2 1 chunk +2 lines, -3 lines 0 comments Download
M tools/bench_pictures_main.cpp View 1 chunk +1 line, -3 lines 0 comments Download
M tools/render_pictures_main.cpp View 1 chunk +1 line, -3 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
bsalomon
Moves GPUStats from GrContext to GrGpu, stats defns to GrTest.cpp, adds functions to append cache/gpu ...
5 years, 10 months ago (2015-02-01 01:34:47 UTC) #2
mtklein
I have also uploaded my suggestions in the form of a CL: https://codereview.chromium.org/894013002 https://codereview.chromium.org/886233004/diff/40001/dm/DM.cpp File ...
5 years, 10 months ago (2015-02-02 16:23:17 UTC) #3
bsalomon
https://codereview.chromium.org/886233004/diff/40001/dm/DMSrcSink.h File dm/DMSrcSink.h (right): https://codereview.chromium.org/886233004/diff/40001/dm/DMSrcSink.h#newcode52 dm/DMSrcSink.h:52: mutable SkString fVerboseLog; On 2015/02/02 16:23:17, mtklein wrote: > ...
5 years, 10 months ago (2015-02-02 19:44:59 UTC) #4
bsalomon
5 years, 10 months ago (2015-02-03 01:31:13 UTC) #5
On 2015/02/02 16:23:17, mtklein wrote:
> I have also uploaded my suggestions in the form of a CL:
> 
> https://codereview.chromium.org/894013002
> 

Somehow I missed this the first time around... plane fatigue... looking at that
cl


> https://codereview.chromium.org/886233004/diff/40001/dm/DM.cpp
> File dm/DM.cpp (right):
> 
> https://codereview.chromium.org/886233004/diff/40001/dm/DM.cpp#newcode54
> dm/DM.cpp:54: SkDebugf("%s(%4dMB %5d) %s\t%s %s %s  ", FLAGS_verbose ? "\n" :
> kSkOverwriteLine
> I think you'll have a better time if we log everything from one SkDebugf call.

> On most platforms, SkDebugf is synchronized so that single calls print out
> atomically.   But there'll definitely be no guarantee that your two SkDebugf
> here will print sequentially.
> 
> https://codereview.chromium.org/886233004/diff/40001/dm/DMSrcSink.cpp
> File dm/DMSrcSink.cpp (right):
> 
>
https://codereview.chromium.org/886233004/diff/40001/dm/DMSrcSink.cpp#newcode148
> dm/DMSrcSink.cpp:148: DEFINE_bool(gpuStats, false, "Print GPU stats after each
> gpu sink runs? Requires verbose.");
> Seems like --gpuStats is plenty enough to control this.  Why don't we just
> ignore --verbose?
> 
> https://codereview.chromium.org/886233004/diff/40001/dm/DMSrcSink.h
> File dm/DMSrcSink.h (right):
> 
> https://codereview.chromium.org/886233004/diff/40001/dm/DMSrcSink.h#newcode52
> dm/DMSrcSink.h:52: mutable SkString fVerboseLog;
> I don't think this is going to work.  Storing mutable state on Sinks means
> they're very not reentrant.
> 
> I think the safe thing to do is write it to this API:
>   Error SK_WARN_UNUSED_RESULT Draw(const Src&, SkBitmap*, SkWStream*,
SkString*
> log);
> Then scope the log SkString to Task::Run() inside DM.
> 
> https://codereview.chromium.org/886233004/diff/40001/src/gpu/GrTest.cpp
> File src/gpu/GrTest.cpp (right):
> 
>
https://codereview.chromium.org/886233004/diff/40001/src/gpu/GrTest.cpp#newco...
> src/gpu/GrTest.cpp:105: out->appendf("Budget: %d items %d bytes\n", fMaxCount,
> fMaxBytes);
> Had some trouble with %d and size_t in these appendf lines.  I figure casting
> them all to int would never go wrong here?

Powered by Google App Engine
This is Rietveld 408576698