Commit 364fcb13 authored by Florian Sattler's avatar Florian Sattler Committed by Commit Bot

[cleanup] Refactor profiler to use default members.

Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I5645a85ca7d85ca9abf2cde9ed4191b1ae06ca73
Reviewed-on: https://chromium-review.googlesource.com/1224170Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#56046}
parent e42c9d3a
......@@ -75,11 +75,6 @@ AllocationTraceTree::AllocationTraceTree()
root_(this, 0) {
}
AllocationTraceTree::~AllocationTraceTree() {
}
AllocationTraceNode* AllocationTraceTree::AddPathFromEnd(
const Vector<unsigned>& path) {
AllocationTraceNode* node = root();
......
......@@ -57,7 +57,7 @@ class AllocationTraceNode {
class AllocationTraceTree {
public:
AllocationTraceTree();
~AllocationTraceTree();
~AllocationTraceTree() = default;
AllocationTraceNode* AddPathFromEnd(const Vector<unsigned>& path);
AllocationTraceNode* root() { return &root_; }
unsigned next_node_id() { return next_node_id_++; }
......
......@@ -16,11 +16,8 @@ SamplingCircularQueue<T, L>::SamplingCircularQueue()
dequeue_pos_(buffer_) {
}
template<typename T, unsigned L>
SamplingCircularQueue<T, L>::~SamplingCircularQueue() {
}
template <typename T, unsigned L>
SamplingCircularQueue<T, L>::~SamplingCircularQueue() = default;
template<typename T, unsigned L>
T* SamplingCircularQueue<T, L>::Peek() {
......
......@@ -106,7 +106,7 @@ class TickSampleEventRecord {
public:
// The parameterless constructor is used when we dequeue data from
// the ticks buffer.
TickSampleEventRecord() { }
TickSampleEventRecord() = default;
explicit TickSampleEventRecord(unsigned order) : order(order) { }
unsigned order;
......
......@@ -551,8 +551,6 @@ V8HeapExplorer::V8HeapExplorer(HeapSnapshot* snapshot,
filler_(nullptr),
global_object_name_resolver_(resolver) {}
V8HeapExplorer::~V8HeapExplorer() = default;
HeapEntry* V8HeapExplorer::AllocateEntry(HeapThing ptr) {
return AddEntry(reinterpret_cast<HeapObject*>(ptr));
}
......@@ -2004,7 +2002,7 @@ class GlobalHandlesExtractor : public PersistentHandleVisitor {
public:
explicit GlobalHandlesExtractor(NativeObjectsExplorer* explorer)
: explorer_(explorer) {}
~GlobalHandlesExtractor() override {}
~GlobalHandlesExtractor() override = default;
void VisitPersistentHandle(Persistent<Value>* value,
uint16_t class_id) override {
Handle<Object> object = Utils::OpenPersistent(value);
......@@ -2109,7 +2107,7 @@ class NativeGroupRetainedObjectInfo : public v8::RetainedObjectInfo {
hash_(reinterpret_cast<intptr_t>(label)),
label_(label) {}
~NativeGroupRetainedObjectInfo() override {}
~NativeGroupRetainedObjectInfo() override = default;
void Dispose() override {
CHECK(!disposed_);
disposed_ = true;
......
......@@ -117,7 +117,7 @@ class HeapEntry {
};
static const int kNoEntry;
HeapEntry() { }
HeapEntry() = default;
HeapEntry(HeapSnapshot* snapshot,
Type type,
const char* name,
......@@ -312,7 +312,7 @@ class V8HeapExplorer : public HeapEntriesAllocator {
V8HeapExplorer(HeapSnapshot* snapshot,
SnapshottingProgressReportingInterface* progress,
v8::HeapProfiler::ObjectNameResolver* resolver);
~V8HeapExplorer() override;
~V8HeapExplorer() override = default;
HeapEntry* AllocateEntry(HeapThing ptr) override;
int EstimateObjectsCount();
bool IterateAndExtractReferences(SnapshotFiller* filler);
......
......@@ -166,7 +166,7 @@ class SamplingAllocationObserver : public AllocationObserver {
heap_(heap),
random_(random),
rate_(rate) {}
~SamplingAllocationObserver() override {}
~SamplingAllocationObserver() override = default;
protected:
void Step(int bytes_allocated, Address soon_object, size_t size) override {
......
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