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

Unified Diff: include/v8-platform.h

Issue 988893003: Implement tracing interface for v8 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove trace-event-common.h and use DEPs instead, remove src/v8.h from trace-event.h, file a bug fo… Created 5 years, 1 month 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 | « build/standalone.gypi ('k') | src/d8.cc » ('j') | src/tracing/trace-event.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8-platform.h
diff --git a/include/v8-platform.h b/include/v8-platform.h
index c6cba0f982929aa8795e214c89f9fc1adc4ffb11..13afa889c726394e375a95920438323e3c1a65c1 100644
--- a/include/v8-platform.h
+++ b/include/v8-platform.h
@@ -5,6 +5,8 @@
#ifndef V8_V8_PLATFORM_H_
#define V8_V8_PLATFORM_H_
+#include <stdint.h>
+
namespace v8 {
class Isolate;
@@ -107,6 +109,32 @@ class Platform {
* the epoch.
**/
virtual double MonotonicallyIncreasingTime() = 0;
+
+ /**
+ * Get a pointer to the enabled state of the given trace category.
+ **/
+ virtual const uint8_t* GetCategoryGroupEnabled(const char* name) = 0;
+
+ /**
+ * Get the category group name of the given category_enabled_flags.
+ **/
+ virtual const char* GetCategoryGroupName(
+ const uint8_t* category_enabled_flag) = 0;
+
+ /**
+ * Add a trace event to the platform tracing system.
Yang 2015/11/19 09:30:32 Can you add a comment about what this method retur
fmeawad 2015/11/20 22:22:20 I have updated the description on all the methods.
+ **/
+ virtual uint64_t AddTraceEvent(
+ char phase, const uint8_t* category_enabled_flag, const char* name,
+ uint64_t id, uint64_t bind_id, int32_t num_args, const char** arg_names,
+ const uint8_t* arg_types, const uint64_t* arg_values,
+ unsigned int flags) = 0;
+
+ /**
+ * Set the duration field of a COMPLETE trace event.
+ **/
+ virtual void UpdateTraceEventDuration(const uint8_t* category_enabled_flag,
+ const char* name, uint64_t handle) = 0;
};
} // namespace v8
« no previous file with comments | « build/standalone.gypi ('k') | src/d8.cc » ('j') | src/tracing/trace-event.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698