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;
71 double delay_in_seconds) = 0;
82 double delay_in_seconds) {}
92 virtual void PostIdleTask(std::unique_ptr<IdleTask> task) = 0;
150 static uint8_t no = 0;
163 char phase,
const uint8_t* category_enabled_flag,
const char* name,
164 const char* scope, uint64_t
id, uint64_t bind_id, int32_t num_args,
165 const char** arg_names,
const uint8_t* arg_types,
166 const uint64_t* arg_values,
167 std::unique_ptr<ConvertableToTraceFormat>* arg_convertables,
168 unsigned int flags) {
172 char phase,
const uint8_t* category_enabled_flag,
const char* name,
173 const char* scope, uint64_t
id, uint64_t bind_id, int32_t num_args,
174 const char** arg_names,
const uint8_t* arg_types,
175 const uint64_t* arg_values,
176 std::unique_ptr<ConvertableToTraceFormat>* arg_convertables,
177 unsigned int flags, int64_t timestamp) {
186 const char* name, uint64_t handle) {}
250 virtual void*
AllocatePages(
void* address,
size_t length,
size_t alignment,
256 virtual bool FreePages(
void* address,
size_t length) = 0;
262 size_t new_length) = 0;
364 double delay_in_seconds) = 0;
372 "Use a taskrunner acquired by GetForegroundTaskRunner instead.",
373 virtual void CallOnForegroundThread(
Isolate* isolate,
Task* task)) = 0;
382 "Use a taskrunner acquired by GetForegroundTaskRunner instead.",
383 virtual void CallDelayedOnForegroundThread(
Isolate* isolate,
Task* task,
384 double delay_in_seconds)) = 0;
395 "Use a taskrunner acquired by GetForegroundTaskRunner instead.",
396 virtual void CallIdleOnForegroundThread(
Isolate* isolate,
454 #endif // V8_V8_PLATFORM_H_
virtual void RemoveTraceStateObserver(TraceStateObserver *)
virtual bool DiscardSystemPages(void *address, size_t size)
virtual size_t AllocatePageSize()=0
virtual void OnTraceDisabled()=0
virtual void PostNonNestableDelayedTask(std::unique_ptr< Task > task, double delay_in_seconds)
virtual bool NonNestableDelayedTasksEnabled() const
virtual void PostIdleTask(std::unique_ptr< IdleTask > task)=0
virtual void OnTraceEnabled()=0
virtual ~TaskRunner()=default
virtual bool IdleTasksEnabled()=0
virtual void * AllocatePages(void *address, size_t length, size_t alignment, Permission permissions)=0
virtual size_t CommitPageSize()=0
virtual const uint8_t * GetCategoryGroupEnabled(const char *name)
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)
virtual void AddTraceStateObserver(TraceStateObserver *)
virtual ~TraceStateObserver()=default
virtual bool NonNestableTasksEnabled() const
virtual ~TracingController()=default
virtual void PostTask(std::unique_ptr< Task > task)=0
virtual bool SetPermissions(void *address, size_t length, Permission permissions)=0
virtual bool FreePages(void *address, size_t length)=0
virtual void * GetRandomMmapAddr()=0
virtual ~IdleTask()=default
virtual void UpdateTraceEventDuration(const uint8_t *category_enabled_flag, const char *name, uint64_t handle)
virtual void SetRandomMmapSeed(int64_t seed)=0
virtual void Run(double deadline_in_seconds)=0
virtual void PostNonNestableTask(std::unique_ptr< Task > task)
virtual ~PageAllocator()=default
virtual void PostDelayedTask(std::unique_ptr< Task > task, double delay_in_seconds)=0
virtual bool ReleasePages(void *address, size_t length, size_t new_length)=0
virtual uint64_t AddTraceEventWithTimestamp(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, int64_t timestamp)