5 #ifndef V8_V8_PLATFORM_H_ 6 #define V8_V8_PLATFORM_H_ 25 virtual ~
Task() =
default;
27 virtual void Run() = 0;
39 virtual void Run(
double deadline_in_seconds) = 0;
54 virtual void PostTask(std::unique_ptr<Task> task) = 0;
62 double delay_in_seconds) = 0;
72 virtual void PostIdleTask(std::unique_ptr<IdleTask> task) = 0;
120 static uint8_t no = 0;
133 char phase,
const uint8_t* category_enabled_flag,
const char* name,
134 const char* scope, uint64_t
id, uint64_t bind_id, int32_t num_args,
135 const char** arg_names,
const uint8_t* arg_types,
136 const uint64_t* arg_values,
137 std::unique_ptr<ConvertableToTraceFormat>* arg_convertables,
138 unsigned int flags) {
141 virtual uint64_t AddTraceEventWithTimestamp(
142 char phase,
const uint8_t* category_enabled_flag,
const char* name,
143 const char* scope, uint64_t
id, uint64_t bind_id, int32_t num_args,
144 const char** arg_names,
const uint8_t* arg_types,
145 const uint64_t* arg_values,
146 std::unique_ptr<ConvertableToTraceFormat>* arg_convertables,
147 unsigned int flags, int64_t timestamp) {
156 const char* name, uint64_t handle) {}
161 virtual void OnTraceEnabled() = 0;
162 virtual void OnTraceDisabled() = 0;
220 virtual void*
AllocatePages(
void* address,
size_t length,
size_t alignment,
226 virtual bool FreePages(
void* address,
size_t length) = 0;
232 size_t new_length) = 0;
318 double delay_in_seconds) = 0;
334 double delay_in_seconds) = 0;
371 typedef void (*StackTracePrinter)();
395 #endif // V8_V8_PLATFORM_H_
Definition: v8-platform.h:108
virtual void PostTask(std::unique_ptr< Task > task)=0
virtual void PostDelayedTask(std::unique_ptr< Task > task, double delay_in_seconds)=0
virtual bool FreePages(void *address, size_t length)=0
Definition: v8-platform.h:177
virtual void SetRandomMmapSeed(int64_t seed)=0
virtual void UpdateTraceEventDuration(const uint8_t *category_enabled_flag, const char *name, uint64_t handle)
Definition: v8-platform.h:155
virtual bool IdleTasksEnabled()=0
virtual void PostIdleTask(std::unique_ptr< IdleTask > task)=0
virtual void * GetRandomMmapAddr()=0
Permission
Definition: v8-platform.h:208
Definition: v8-platform.h:158
Definition: v8-platform.h:16
virtual bool ReleasePages(void *address, size_t length, size_t new_length)=0
virtual const uint8_t * GetCategoryGroupEnabled(const char *name)
Definition: v8-platform.h:119
virtual void * AllocatePages(void *address, size_t length, size_t alignment, Permission permissions)=0
virtual void AddTraceStateObserver(TraceStateObserver *)
Definition: v8-platform.h:166
Definition: v8-platform.h:48
virtual size_t AllocatePageSize()=0
virtual 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< ConvertableToTraceFormat > *arg_convertables, unsigned int flags)
Definition: v8-platform.h:132
Definition: v8-platform.h:36
Definition: v8-platform.h:23
virtual size_t CommitPageSize()=0
virtual void RemoveTraceStateObserver(TraceStateObserver *)
Definition: v8-platform.h:169
virtual bool SetPermissions(void *address, size_t length, Permission permissions)=0