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

Unified Diff: webkit/glue/webkitplatformsupport_impl.cc

Issue 12316146: Expose global state variables for sampling tracing to WebKit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed return types Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/webkitplatformsupport_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webkitplatformsupport_impl.cc
diff --git a/webkit/glue/webkitplatformsupport_impl.cc b/webkit/glue/webkitplatformsupport_impl.cc
index 34e63d231d2d0f34fecb63e44a0249bcd9ea41b6..0064ce93f12d8f0527ab298e9c69b622d8b5cdba 100644
--- a/webkit/glue/webkitplatformsupport_impl.cc
+++ b/webkit/glue/webkitplatformsupport_impl.cc
@@ -10,7 +10,6 @@
#include "base/allocator/allocator_extension.h"
#include "base/bind.h"
-#include "base/debug/trace_event.h"
#include "base/memory/discardable_memory.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
@@ -453,6 +452,21 @@ const unsigned char* WebKitPlatformSupportImpl::getTraceCategoryEnabledFlag(
return TRACE_EVENT_API_GET_CATEGORY_ENABLED(category_name);
}
+long* WebKitPlatformSupportImpl::getTraceSamplingState(
+ const unsigned thread_bucket) {
+ switch(thread_bucket) {
+ case 0:
+ return reinterpret_cast<long*>(&TRACE_EVENT_API_THREAD_BUCKET(0));
+ case 1:
+ return reinterpret_cast<long*>(&TRACE_EVENT_API_THREAD_BUCKET(1));
+ case 2:
+ return reinterpret_cast<long*>(&TRACE_EVENT_API_THREAD_BUCKET(2));
+ default:
+ NOTREACHED() << "Unknown thread bucket type.";
+ }
+ return NULL;
+}
+
void WebKitPlatformSupportImpl::addTraceEvent(
char phase,
const unsigned char* category_enabled,
« no previous file with comments | « webkit/glue/webkitplatformsupport_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698