summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cc/raster/scoped_gpu_raster.cc4
-rw-r--r--content/browser/android/in_process/context_provider_in_process.cc2
-rw-r--r--content/renderer/pepper/video_decoder_shim.cc9
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc15
-rw-r--r--gpu/command_buffer/service/gpu_tracer.cc7
-rw-r--r--gpu/command_buffer/service/gpu_tracer.h1
-rw-r--r--gpu/command_buffer/service/gpu_tracer_unittest.cc6
-rw-r--r--ppapi/shared_impl/ppb_graphics_3d_shared.cc2
8 files changed, 18 insertions, 28 deletions
diff --git a/cc/raster/scoped_gpu_raster.cc b/cc/raster/scoped_gpu_raster.cc
index f548515..e6dcf23 100644
--- a/cc/raster/scoped_gpu_raster.cc
+++ b/cc/raster/scoped_gpu_raster.cc
@@ -27,7 +27,7 @@ void ScopedGpuRaster::BeginGpuRaster() {
// TODO(alokp): Use a trace macro to push/pop markers.
// Using push/pop functions directly incurs cost to evaluate function
// arguments even when tracing is disabled.
- gl->PushGroupMarkerEXT(0, "GpuRasterization");
+ gl->TraceBeginCHROMIUM("ScopedGpuRaster", "GpuRasterization");
class GrContext* gr_context = context_provider_->GrContext();
gr_context->resetContext();
@@ -45,7 +45,7 @@ void ScopedGpuRaster::EndGpuRaster() {
// TODO(alokp): Use a trace macro to push/pop markers.
// Using push/pop functions directly incurs cost to evaluate function
// arguments even when tracing is disabled.
- gl->PopGroupMarkerEXT();
+ gl->TraceEndCHROMIUM();
}
} // namespace cc
diff --git a/content/browser/android/in_process/context_provider_in_process.cc b/content/browser/android/in_process/context_provider_in_process.cc
index f9ab90e..5fea00f 100644
--- a/content/browser/android/in_process/context_provider_in_process.cc
+++ b/content/browser/android/in_process/context_provider_in_process.cc
@@ -83,7 +83,7 @@ bool ContextProviderInProcess::BindToCurrentThread() {
InitializeCapabilities();
- std::string unique_context_name =
+ const std::string unique_context_name =
base::StringPrintf("%s-%p", debug_name_.c_str(), context3d_.get());
context3d_->traceBeginCHROMIUM("gpu_toplevel",
unique_context_name.c_str());
diff --git a/content/renderer/pepper/video_decoder_shim.cc b/content/renderer/pepper/video_decoder_shim.cc
index 471d2c5..5122117 100644
--- a/content/renderer/pepper/video_decoder_shim.cc
+++ b/content/renderer/pepper/video_decoder_shim.cc
@@ -312,8 +312,7 @@ bool VideoDecoderShim::YUVConverter::Initialize() {
return false;
}
- gl_->PushGroupMarkerEXT(0, "YUVConverterContext");
-
+ gl_->TraceBeginCHROMIUM("YUVConverter", "YUVConverterContext");
gl_->GenFramebuffers(1, &frame_buffer_);
y_texture_ = CreateTexture();
@@ -332,7 +331,7 @@ bool VideoDecoderShim::YUVConverter::Initialize() {
program_ = CreateShader();
- gl_->PopGroupMarkerEXT();
+ gl_->TraceEndCHROMIUM();
context_provider_->InvalidateGrContext(kGrInvalidateState);
@@ -414,7 +413,7 @@ void VideoDecoderShim::YUVConverter::Convert(
y_width_ = y_height_ = 0;
}
- gl_->PushGroupMarkerEXT(0, "YUVConverterContext");
+ gl_->TraceBeginCHROMIUM("YUVConverter", "YUVConverterContext");
uint32_t ywidth = frame->coded_size().width();
uint32_t yheight = frame->coded_size().height();
@@ -565,7 +564,7 @@ void VideoDecoderShim::YUVConverter::Convert(
gl_->BindTexture(GL_TEXTURE_2D, 0);
gl_->PixelStorei(GL_UNPACK_ROW_LENGTH, 0);
- gl_->PopGroupMarkerEXT();
+ gl_->TraceEndCHROMIUM();
context_provider_->InvalidateGrContext(kGrInvalidateState);
}
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 174b787..c25024f 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -11051,7 +11051,7 @@ void GLES2DecoderImpl::DoSwapBuffers() {
}
ScopedGPUTrace scoped_gpu_trace(gpu_tracer_.get(), kTraceDecoder,
- "gpu_toplevel", "SwapBuffer");
+ "GLES2Decoder", "SwapBuffer");
bool is_tracing;
TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("gpu.debug"),
@@ -13171,19 +13171,10 @@ void GLES2DecoderImpl::DoInsertEventMarkerEXT(
}
void GLES2DecoderImpl::DoPushGroupMarkerEXT(
- GLsizei length, const GLchar* marker) {
- if (!marker) {
- marker = "";
- }
- std::string name = length ? std::string(marker, length) : std::string(marker);
- debug_marker_manager_.PushGroup(name);
- gpu_tracer_->Begin(TRACE_DISABLED_BY_DEFAULT("gpu_group_marker"), name,
- kTraceGroupMarker);
+ GLsizei /*length*/, const GLchar* /*marker*/) {
}
void GLES2DecoderImpl::DoPopGroupMarkerEXT(void) {
- debug_marker_manager_.PopGroup();
- gpu_tracer_->End(kTraceGroupMarker);
}
void GLES2DecoderImpl::DoBindTexImage2DCHROMIUM(
@@ -13292,6 +13283,7 @@ error::Error GLES2DecoderImpl::HandleTraceBeginCHROMIUM(
return error::kInvalidArguments;
}
+ debug_marker_manager_.PushGroup(trace_name);
if (!gpu_tracer_->Begin(category_name, trace_name, kTraceCHROMIUM)) {
LOCAL_SET_GL_ERROR(
GL_INVALID_OPERATION,
@@ -13302,6 +13294,7 @@ error::Error GLES2DecoderImpl::HandleTraceBeginCHROMIUM(
}
void GLES2DecoderImpl::DoTraceEndCHROMIUM() {
+ debug_marker_manager_.PopGroup();
if (!gpu_tracer_->End(kTraceCHROMIUM)) {
LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION,
"glTraceEndCHROMIUM", "no trace begin found");
diff --git a/gpu/command_buffer/service/gpu_tracer.cc b/gpu/command_buffer/service/gpu_tracer.cc
index 868c5ec..5e6cd63 100644
--- a/gpu/command_buffer/service/gpu_tracer.cc
+++ b/gpu/command_buffer/service/gpu_tracer.cc
@@ -26,10 +26,9 @@ namespace gles2 {
static const unsigned int kProcessInterval = 16;
static const char* kGpuTraceSourceNames[] = {
- "GroupMarker", // kTraceGroupMarker = 0,
- "TraceCHROMIUM", // kTraceCHROMIUM = 1,
- "TraceCmd", // kTraceDecoder = 2,
- "Disjoint", // kTraceDisjoint = 3, // Used internally.
+ "TraceCHROMIUM", // kTraceCHROMIUM,
+ "TraceCmd", // kTraceDecoder,
+ "Disjoint", // kTraceDisjoint, // Used internally.
};
static_assert(NUM_TRACER_SOURCES == arraysize(kGpuTraceSourceNames),
"Trace source names must match enumeration.");
diff --git a/gpu/command_buffer/service/gpu_tracer.h b/gpu/command_buffer/service/gpu_tracer.h
index 610af9d..596e60b 100644
--- a/gpu/command_buffer/service/gpu_tracer.h
+++ b/gpu/command_buffer/service/gpu_tracer.h
@@ -33,7 +33,6 @@ class GPUTrace;
enum GpuTracerSource {
kTraceGroupInvalid = -1,
- kTraceGroupMarker,
kTraceCHROMIUM,
kTraceDecoder,
kTraceDisjoint, // Used internally.
diff --git a/gpu/command_buffer/service/gpu_tracer_unittest.cc b/gpu/command_buffer/service/gpu_tracer_unittest.cc
index 9bb5998..f636edd9 100644
--- a/gpu/command_buffer/service/gpu_tracer_unittest.cc
+++ b/gpu/command_buffer/service/gpu_tracer_unittest.cc
@@ -227,7 +227,7 @@ class BaseGpuTraceTest : public BaseGpuTest {
void DoTraceTest(bool tracing_service, bool tracing_device) {
// Expected results
- const GpuTracerSource tracer_source = kTraceGroupMarker;
+ const GpuTracerSource tracer_source = kTraceCHROMIUM;
const std::string category_name("trace_category");
const std::string trace_name("trace_test");
const int64 offset_time = 3231;
@@ -766,11 +766,11 @@ TEST_F(GPUTracerTest, TraceDuringDecodeTest) {
const std::string trace_name("trace_test");
EXPECT_FALSE(
- tracer_tester_->Begin(category_name, trace_name, kTraceGroupMarker));
+ tracer_tester_->Begin(category_name, trace_name, kTraceCHROMIUM));
ASSERT_TRUE(tracer_tester_->BeginDecoding());
EXPECT_TRUE(
- tracer_tester_->Begin(category_name, trace_name, kTraceGroupMarker));
+ tracer_tester_->Begin(category_name, trace_name, kTraceCHROMIUM));
ASSERT_TRUE(tracer_tester_->EndDecoding());
}
diff --git a/ppapi/shared_impl/ppb_graphics_3d_shared.cc b/ppapi/shared_impl/ppb_graphics_3d_shared.cc
index 32eebe6..854bf51 100644
--- a/ppapi/shared_impl/ppb_graphics_3d_shared.cc
+++ b/ppapi/shared_impl/ppb_graphics_3d_shared.cc
@@ -139,7 +139,7 @@ bool PPB_Graphics3D_Shared::CreateGLES2Impl(
return false;
}
- gles2_impl_->PushGroupMarkerEXT(0, "PPAPIContext");
+ gles2_impl_->TraceBeginCHROMIUM("gpu_toplevel", "PPAPIContext");
return true;
}