Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
chakrashim: fix shim API in TraceObject
Browse files Browse the repository at this point in the history
  • Loading branch information
boingoing committed Nov 15, 2018
1 parent 7e528f6 commit b88e572
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
13 changes: 8 additions & 5 deletions deps/chakrashim/include/libplatform/v8-tracing.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ 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, int64_t timestamp, int64_t cpu_timestamp);
void UpdateDuration();
void InitializeForTesting(char phase, const uint8_t* category_enabled_flag,
const char* name, const char* scope, uint64_t id,
Expand Down Expand Up @@ -241,6 +243,7 @@ class TracingController
void StopTracing();

virtual int64_t CurrentTimestampMicroseconds();
virtual int64_t CurrentCpuTimestampMicroseconds();

private:
const uint8_t* GetCategoryGroupEnabledInternal(const char* category_group);
Expand Down
22 changes: 22 additions & 0 deletions deps/chakrashim/src/v8v8.cc
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,10 @@ namespace tracing {
return 0;
}

int64_t TracingController::CurrentCpuTimestampMicroseconds() {
return 0;
}

void TraceConfig::AddIncludedCategory(char const*) {
jsrt::Unimplemented("TraceConfig");
}
Expand All @@ -287,6 +291,24 @@ namespace tracing {
// Intentionally left empty to suppress warning C4722.
}

void TraceObject::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,
int64_t timestamp,
int64_t cpu_timestamp) {
// Unimplemented
}

TraceWriter* TraceWriter::CreateJSONTraceWriter(std::ostream&) {
jsrt::Unimplemented("TraceWriter");
return 0;
Expand Down

0 comments on commit b88e572

Please sign in to comment.