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

Unified Diff: include/libplatform/v8-tracing.h

Issue 2367603002: [tracing] Support ConvertableToTraceFormat argument type. (Closed)
Patch Set: Fix layout tests failures & reland. Created 4 years, 3 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 | « no previous file | include/v8-platform.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/libplatform/v8-tracing.h
diff --git a/include/libplatform/v8-tracing.h b/include/libplatform/v8-tracing.h
index 7646ea5489664300ec7ad64ea1dbce6451c15424..bbf1dd71f2358505e7aa0b3c8e7828910d918311 100644
--- a/include/libplatform/v8-tracing.h
+++ b/include/libplatform/v8-tracing.h
@@ -9,6 +9,8 @@
#include <memory>
#include <vector>
+#include "include/v8-platform.h"
+
namespace v8 {
namespace platform {
namespace tracing {
@@ -28,19 +30,22 @@ class TraceObject {
TraceObject() {}
~TraceObject();
- void Initialize(char phase, const uint8_t* category_enabled_flag,
- const char* name, const char* scope, uint64_t id,
- uint64_t bind_id, int num_args, const char** arg_names,
- const uint8_t* arg_types, const uint64_t* arg_values,
- unsigned int flags);
+ void Initialize(
+ char phase, const uint8_t* category_enabled_flag, const char* name,
+ const char* scope, uint64_t id, uint64_t bind_id, int num_args,
+ const char** arg_names, const uint8_t* arg_types,
+ const uint64_t* arg_values,
+ std::unique_ptr<v8::ConvertableToTraceFormat>* arg_convertables,
+ unsigned int flags);
void UpdateDuration();
- void InitializeForTesting(char phase, const uint8_t* category_enabled_flag,
- const char* name, const char* scope, uint64_t id,
- uint64_t bind_id, int num_args,
- const char** arg_names, const uint8_t* arg_types,
- const uint64_t* arg_values, unsigned int flags,
- int pid, int tid, int64_t ts, int64_t tts,
- uint64_t duration, uint64_t cpu_duration);
+ void InitializeForTesting(
+ char phase, const uint8_t* category_enabled_flag, const char* name,
+ const char* scope, uint64_t id, uint64_t bind_id, int num_args,
+ const char** arg_names, const uint8_t* arg_types,
+ const uint64_t* arg_values,
+ std::unique_ptr<v8::ConvertableToTraceFormat>* arg_convertables,
+ unsigned int flags, int pid, int tid, int64_t ts, int64_t tts,
+ uint64_t duration, uint64_t cpu_duration);
int pid() const { return pid_; }
int tid() const { return tid_; }
@@ -56,6 +61,9 @@ class TraceObject {
const char** arg_names() { return arg_names_; }
uint8_t* arg_types() { return arg_types_; }
ArgValue* arg_values() { return arg_values_; }
+ std::unique_ptr<v8::ConvertableToTraceFormat>* arg_convertables() {
+ return arg_convertables_;
+ }
unsigned int flags() const { return flags_; }
int64_t ts() { return ts_; }
int64_t tts() { return tts_; }
@@ -71,10 +79,12 @@ class TraceObject {
const uint8_t* category_enabled_flag_;
uint64_t id_;
uint64_t bind_id_;
- int num_args_;
+ int num_args_ = 0;
const char* arg_names_[kTraceMaxNumArgs];
uint8_t arg_types_[kTraceMaxNumArgs];
ArgValue arg_values_[kTraceMaxNumArgs];
+ std::unique_ptr<v8::ConvertableToTraceFormat>
+ arg_convertables_[kTraceMaxNumArgs];
char* parameter_copy_storage_ = nullptr;
unsigned int flags_;
int64_t ts_;
@@ -221,11 +231,13 @@ class TracingController {
void Initialize(TraceBuffer* trace_buffer);
const uint8_t* GetCategoryGroupEnabled(const char* category_group);
static const char* GetCategoryGroupName(const uint8_t* category_enabled_flag);
- uint64_t AddTraceEvent(char phase, const uint8_t* category_enabled_flag,
- const char* name, const char* scope, 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);
+ uint64_t AddTraceEvent(
+ char phase, const uint8_t* category_enabled_flag, const char* name,
+ const char* scope, 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,
+ std::unique_ptr<v8::ConvertableToTraceFormat>* arg_convertables,
+ unsigned int flags);
void UpdateTraceEventDuration(const uint8_t* category_enabled_flag,
const char* name, uint64_t handle);
« no previous file with comments | « no previous file | include/v8-platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698