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

Side by Side Diff: webkit/glue/webkitclient_impl.cc

Issue 6877101: Replaced std::string argument storage in gpu_trace_event with faster TraceAnyType (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gpu/common/gpu_trace_event.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/glue/webkitclient_impl.h" 5 #include "webkit/glue/webkitclient_impl.h"
6 6
7 #if defined(OS_LINUX) 7 #if defined(OS_LINUX)
8 #include <malloc.h> 8 #include <malloc.h>
9 #endif 9 #endif
10 10
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 base::LinearHistogram::FactoryGet(name, 1, boundary_value, 279 base::LinearHistogram::FactoryGet(name, 1, boundary_value,
280 boundary_value + 1, base::Histogram::kUmaTargetedHistogramFlag); 280 boundary_value + 1, base::Histogram::kUmaTargetedHistogramFlag);
281 DCHECK_EQ(name, counter->histogram_name()); 281 DCHECK_EQ(name, counter->histogram_name());
282 counter->Add(sample); 282 counter->Add(sample);
283 } 283 }
284 284
285 void WebKitClientImpl::traceEventBegin(const char* name, void* id, 285 void WebKitClientImpl::traceEventBegin(const char* name, void* id,
286 const char* extra) { 286 const char* extra) {
287 TRACE_EVENT_BEGIN(name, id, extra); 287 TRACE_EVENT_BEGIN(name, id, extra);
288 GPU_TRACE_EVENT_BEGIN2("webkit", name, 288 GPU_TRACE_EVENT_BEGIN2("webkit", name,
289 "id", StringPrintf("%p", id).c_str(), 289 "id", id,
290 "extra", extra ? extra : ""); 290 "extra", extra ? extra : "");
291 } 291 }
292 292
293 void WebKitClientImpl::traceEventEnd(const char* name, void* id, 293 void WebKitClientImpl::traceEventEnd(const char* name, void* id,
294 const char* extra) { 294 const char* extra) {
295 TRACE_EVENT_END(name, id, extra); 295 TRACE_EVENT_END(name, id, extra);
296 GPU_TRACE_EVENT_END0("webkit", name); 296 GPU_TRACE_EVENT_END0("webkit", name);
297 } 297 }
298 298
299 namespace { 299 namespace {
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 ++shared_timer_suspended_; 596 ++shared_timer_suspended_;
597 } 597 }
598 598
599 void WebKitClientImpl::ResumeSharedTimer() { 599 void WebKitClientImpl::ResumeSharedTimer() {
600 // The shared timer may have fired or been adjusted while we were suspended. 600 // The shared timer may have fired or been adjusted while we were suspended.
601 if (--shared_timer_suspended_ == 0 && !shared_timer_.IsRunning()) 601 if (--shared_timer_suspended_ == 0 && !shared_timer_.IsRunning())
602 setSharedTimerFireTime(shared_timer_fire_time_); 602 setSharedTimerFireTime(shared_timer_fire_time_);
603 } 603 }
604 604
605 } // namespace webkit_glue 605 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « gpu/common/gpu_trace_event.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698