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