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

Issue 904743002: gpu: Extract the gpu timing code from gpu_tracer. (Closed)

Created:
5 years, 10 months ago by Daniele Castagna
Modified:
5 years, 10 months ago
CC:
chromium-reviews, piman+watch_chromium.org, Nico
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

gpu: Extract the gpu timing code from gpu_tracer. This commit introduces two new classes: GPUTiming and GPUTimer. The first one takes care of checking which timing GL extension to use, and the second one measures the amount of time it takes to complete a set of opengl commands. GPUTracer and GPUTrace have been modified accordingly to use the two new classes. BUG= Committed: https://crrev.com/82922f87f213ee34c2dc319b937c5137a939ac52 Cr-Commit-Position: refs/heads/master@{#316020}

Patch Set 1 #

Patch Set 2 : Fix cl.exe warning: 'const unsigned char' : forcing value to bool 'true' or 'false' #

Total comments: 16

Patch Set 3 : Remove a useless float conversion that screwed up timings. Address first review comments. #

Patch Set 4 : Fix indentation. #

Total comments: 2

Patch Set 5 : Reset g_fakeCPUTime to 0. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+397 lines, -380 lines) Patch
M gpu/command_buffer/service/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gpu_service_test.h View 2 chunks +2 lines, -1 line 0 comments Download
M gpu/command_buffer/service/gpu_service_test.cc View 1 chunk +3 lines, -0 lines 0 comments Download
A gpu/command_buffer/service/gpu_timing.h View 1 2 1 chunk +85 lines, -0 lines 0 comments Download
A gpu/command_buffer/service/gpu_timing.cc View 1 2 1 chunk +145 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gpu_tracer.h View 1 2 6 chunks +25 lines, -61 lines 0 comments Download
M gpu/command_buffer/service/gpu_tracer.cc View 1 2 3 9 chunks +34 lines, -181 lines 0 comments Download
M gpu/command_buffer/service/gpu_tracer_unittest.cc View 1 2 3 4 19 chunks +99 lines, -137 lines 0 comments Download
M gpu/command_buffer_service.gypi View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (8 generated)
Daniele Castagna
5 years, 10 months ago (2015-02-05 22:16:19 UTC) #2
David Yen
+vmiura Overall it looks like it's going in the right direction, great job. Device traces ...
5 years, 10 months ago (2015-02-06 22:47:01 UTC) #4
Daniele Castagna
Thank you for the review! The problem with the device traces not working correctly was ...
5 years, 10 months ago (2015-02-10 04:49:33 UTC) #5
vmiura
https://codereview.chromium.org/904743002/diff/20001/gpu/command_buffer/service/gpu_tracer.cc File gpu/command_buffer/service/gpu_tracer.cc (right): https://codereview.chromium.org/904743002/diff/20001/gpu/command_buffer/service/gpu_tracer.cc#newcode302 gpu/command_buffer/service/gpu_tracer.cc:302: traces_.clear(); On 2015/02/10 04:49:33, dcastagna wrote: > On 2015/02/06 ...
5 years, 10 months ago (2015-02-10 07:43:14 UTC) #6
Daniele Castagna
https://codereview.chromium.org/904743002/diff/20001/gpu/command_buffer/service/gpu_tracer.cc File gpu/command_buffer/service/gpu_tracer.cc (right): https://codereview.chromium.org/904743002/diff/20001/gpu/command_buffer/service/gpu_tracer.cc#newcode302 gpu/command_buffer/service/gpu_tracer.cc:302: traces_.clear(); On 2015/02/10 07:43:13, vmiura wrote: > On 2015/02/10 ...
5 years, 10 months ago (2015-02-10 17:28:27 UTC) #7
David Yen
lgtm with global variable reset in unittest. Wait for vmiura as he is the owner ...
5 years, 10 months ago (2015-02-10 22:30:01 UTC) #8
Daniele Castagna
https://codereview.chromium.org/904743002/diff/60001/gpu/command_buffer/service/gpu_tracer_unittest.cc File gpu/command_buffer/service/gpu_tracer_unittest.cc (right): https://codereview.chromium.org/904743002/diff/60001/gpu/command_buffer/service/gpu_tracer_unittest.cc#newcode28 gpu/command_buffer/service/gpu_tracer_unittest.cc:28: int64 g_fakeCPUTime = 0; On 2015/02/10 22:30:01, David Yen ...
5 years, 10 months ago (2015-02-10 22:42:36 UTC) #10
vmiura
LGTM, nice work.
5 years, 10 months ago (2015-02-12 06:57:30 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/904743002/80001
5 years, 10 months ago (2015-02-12 07:07:34 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/42224)
5 years, 10 months ago (2015-02-12 07:12:58 UTC) #15
vmiura
sievers@chromium.org: Please review changes in gypi file.
5 years, 10 months ago (2015-02-12 07:27:36 UTC) #17
no sievers
On 2015/02/12 07:27:36, vmiura wrote: > mailto:sievers@chromium.org: Please review changes in gypi file. lgtm
5 years, 10 months ago (2015-02-12 19:11:51 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/904743002/80001
5 years, 10 months ago (2015-02-12 19:13:56 UTC) #20
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 10 months ago (2015-02-12 19:21:39 UTC) #21
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/82922f87f213ee34c2dc319b937c5137a939ac52 Cr-Commit-Position: refs/heads/master@{#316020}
5 years, 10 months ago (2015-02-12 19:22:56 UTC) #22
Nico
This leads to these reports on the DrMemory bots: UNINITIALIZED READ: reading 0x0015e9bc-0x0015e9bd 1 byte(s) ...
5 years, 10 months ago (2015-02-13 05:56:01 UTC) #24
Daniele Castagna
On 2015/02/13 at 05:56:01, thakis wrote: > This leads to these reports on the DrMemory ...
5 years, 10 months ago (2015-02-13 18:57:22 UTC) #25
Nico
5 years, 10 months ago (2015-02-13 19:09:34 UTC) #26
Message was sent while issue was closed.
Looking at this again, it seems I misread which line the report refers to.
Apparently it's about `return disjoing_value != 0`, which is even more
surprising to me. I filed
https://code.google.com/p/chromium/issues/detail?id=458607 for this.

On Fri, Feb 13, 2015 at 10:57 AM, <dcastagna@chromium.org> wrote:

> On 2015/02/13 at 05:56:01, thakis wrote:
>
>> This leads to these reports on the DrMemory bots:
>>
>
>  UNINITIALIZED READ: reading 0x0015e9bc-0x0015e9bd 1 byte(s) within
>>
> 0x0015e9bc-0x0015e9c0
>
>> # 0 gpu.dll!gpu::GPUTiming::CheckAndResetTimerErrors
>>
> [gpu\command_buffer\service\gpu_timing.cc:107]
>
>> # 1 gpu.dll!gpu::gles2::GPUTracer::BeginDecoding
>>
> [gpu\command_buffer\service\gpu_tracer.cc:162]
>
>> # 2 gpu::gles2::`anonymous namespace'::BaseGpuTracerTest::DoDisjointTest
>>
> [gpu\command_buffer\service\gpu_tracer_unittest.cc:533]
>
>> # 3 testing::internal::HandleExceptionsInMethodIfSupported<>
>>
> [testing\gtest\src\gtest.cc:2420]
>
>> Note: @0:00:32.043 in thread 3720
>> Note: instruction: cmp    0xfffffffc(%ebp) %eax
>> Suppression (error hash=#63E17FFDBA588F6C#):
>> For more info on using suppressions see
>>
> http://dev.chromium.org/developers/how-tos/using-drmemory#TOC-Suppressing-
> error-reports-from-the-
>
>> {
>> UNINITIALIZED READ
>> name=<insert_a_suppression_name_here>
>> gpu.dll!gpu::GPUTiming::CheckAndResetTimerErrors
>> gpu.dll!gpu::gles2::GPUTracer::BeginDecoding
>> *!gpu::gles2::`anonymous namespace'::BaseGpuTracerTest::DoDisjointTest
>> *!testing::internal::HandleExceptionsInMethodIfSupported<>
>> }
>>
>
>
>  It looks like timer_type_ isn't set in the constructor – it should
>> probably be
>>
> set to some default value.
>
> After a quick chat with thakis@ we determined that timer_type_ should be
> already
> initialized correctly where it's defined. Non-Static Class Member
> Initializers
> are allowed according to https://chromium-cpp.appspot.com/.
> thakis@ is still looking into this.
>
> https://codereview.chromium.org/904743002/
>

To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698