Commit 3c9549a3 authored by Florian Sattler's avatar Florian Sattler Committed by Commit Bot

[cleanup] Refactor compiler-dispatcher profiler to use default members.

Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I41b3d7c41ee9f8ff12f70feddcf38f2c9efc5049
Reviewed-on: https://chromium-review.googlesource.com/1224056Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55917}
parent ac52db3b
......@@ -30,7 +30,7 @@ class V8_EXPORT_PRIVATE CompilerDispatcherJob {
CompilerDispatcherJob(Type type) : type_(type), status_(Status::kInitial) {}
virtual ~CompilerDispatcherJob() {}
virtual ~CompilerDispatcherJob() = default;
Type type() const { return type_; }
......
......@@ -63,7 +63,7 @@ CompilerDispatcherTracer::CompilerDispatcherTracer(Isolate* isolate)
}
}
CompilerDispatcherTracer::~CompilerDispatcherTracer() {}
CompilerDispatcherTracer::~CompilerDispatcherTracer() = default;
void CompilerDispatcherTracer::RecordPrepare(double duration_ms) {
base::LockGuard<base::Mutex> lock(&mutex_);
......
......@@ -88,7 +88,7 @@ MemoryPressureTask::MemoryPressureTask(CancelableTaskManager* task_manager,
CompilerDispatcher* dispatcher)
: CancelableTask(task_manager), dispatcher_(dispatcher) {}
MemoryPressureTask::~MemoryPressureTask() {}
MemoryPressureTask::~MemoryPressureTask() = default;
void MemoryPressureTask::RunInternal() {
dispatcher_->AbortAll(BlockingBehavior::kDontBlock);
......@@ -115,7 +115,7 @@ CompilerDispatcher::AbortTask::AbortTask(CancelableTaskManager* task_manager,
CompilerDispatcher* dispatcher)
: CancelableTask(task_manager), dispatcher_(dispatcher) {}
CompilerDispatcher::AbortTask::~AbortTask() {}
CompilerDispatcher::AbortTask::~AbortTask() = default;
void CompilerDispatcher::AbortTask::RunInternal() {
dispatcher_->AbortInactiveJobs();
......@@ -140,7 +140,7 @@ CompilerDispatcher::WorkerTask::WorkerTask(CancelableTaskManager* task_manager,
CompilerDispatcher* dispatcher)
: CancelableTask(task_manager), dispatcher_(dispatcher) {}
CompilerDispatcher::WorkerTask::~WorkerTask() {}
CompilerDispatcher::WorkerTask::~WorkerTask() = default;
void CompilerDispatcher::WorkerTask::RunInternal() {
dispatcher_->DoBackgroundWork();
......@@ -164,7 +164,7 @@ CompilerDispatcher::IdleTask::IdleTask(CancelableTaskManager* task_manager,
CompilerDispatcher* dispatcher)
: CancelableIdleTask(task_manager), dispatcher_(dispatcher) {}
CompilerDispatcher::IdleTask::~IdleTask() {}
CompilerDispatcher::IdleTask::~IdleTask() = default;
void CompilerDispatcher::IdleTask::RunInternal(double deadline_in_seconds) {
dispatcher_->DoIdleWork(deadline_in_seconds);
......
......@@ -50,7 +50,7 @@ class OptimizingCompileDispatcher::CompileTask : public CancelableTask {
++dispatcher_->ref_count_;
}
virtual ~CompileTask() {}
virtual ~CompileTask() = default;
private:
// v8::Task overrides.
......
......@@ -826,7 +826,7 @@ class PressureNotificationTask : public CancelableTask {
PressureNotificationTask(Isolate* isolate, CompilerDispatcher* dispatcher,
base::Semaphore* sem)
: CancelableTask(isolate), dispatcher_(dispatcher), sem_(sem) {}
~PressureNotificationTask() override {}
~PressureNotificationTask() override = default;
void RunInternal() override {
dispatcher_->MemoryPressureNotification(v8::MemoryPressureLevel::kCritical,
......
......@@ -27,7 +27,7 @@ namespace internal {
class UnoptimizedCompileJobTest : public TestWithNativeContext {
public:
UnoptimizedCompileJobTest() : tracer_(isolate()) {}
~UnoptimizedCompileJobTest() override {}
~UnoptimizedCompileJobTest() override = default;
CompilerDispatcherTracer* tracer() { return &tracer_; }
......@@ -199,7 +199,7 @@ class CompileTask : public Task {
public:
CompileTask(UnoptimizedCompileJob* job, base::Semaphore* semaphore)
: job_(job), semaphore_(semaphore) {}
~CompileTask() override {}
~CompileTask() override = default;
void Run() override {
job_->Compile(true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment