Commit f9be5db0 authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

Remove V8.MemoryHeapCommitted and V8.MemoryHeapUsed histograms.

They are replaced by
- Memory.Experimental.Renderer2.V8
- Memory.Experimental.Renderer2.V8.AllocatedObjects

Bug: chromium:852415
Change-Id: I64285e5067304319acadc0d64a05aa553d8ae6e0
Reviewed-on: https://chromium-review.googlesource.com/1101197
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54444}
parent a1ef54bb
...@@ -215,24 +215,6 @@ Counters::Counters(Isolate* isolate) ...@@ -215,24 +215,6 @@ Counters::Counters(Isolate* isolate)
Histogram(histogram.caption, 1000, 500000, 50, this); Histogram(histogram.caption, 1000, 500000, 50, this);
} }
// For n = 100, low = 4000, high = 2000000: the factor = 1.06.
static const struct {
Histogram Counters::*member;
AggregatedMemoryHistogram<Histogram> Counters::*aggregated;
const char* caption;
} kMemoryHistograms[] = {
#define HM(name, caption) \
{&Counters::name##_, &Counters::aggregated_##name##_, #caption},
HISTOGRAM_MEMORY_LIST(HM)
#undef HM
};
for (const auto& histogram : kMemoryHistograms) {
this->*histogram.member =
Histogram(histogram.caption, 4000, 2000000, 100, this);
this->*histogram.aggregated =
AggregatedMemoryHistogram<Histogram>(&(this->*histogram.member));
}
// clang-format off // clang-format off
static const struct { static const struct {
StatsCounter Counters::*member; StatsCounter Counters::*member;
...@@ -323,7 +305,6 @@ void Counters::ResetCreateHistogramFunction(CreateHistogramCallback f) { ...@@ -323,7 +305,6 @@ void Counters::ResetCreateHistogramFunction(CreateHistogramCallback f) {
#define HM(name, caption) name##_.Reset(); #define HM(name, caption) name##_.Reset();
HISTOGRAM_LEGACY_MEMORY_LIST(HM) HISTOGRAM_LEGACY_MEMORY_LIST(HM)
HISTOGRAM_MEMORY_LIST(HM)
#undef HM #undef HM
} }
......
...@@ -1290,12 +1290,6 @@ class RuntimeCallTimerScope { ...@@ -1290,12 +1290,6 @@ class RuntimeCallTimerScope {
HM(heap_sample_code_space_committed, V8.MemoryHeapSampleCodeSpaceCommitted) \ HM(heap_sample_code_space_committed, V8.MemoryHeapSampleCodeSpaceCommitted) \
HM(heap_sample_maximum_committed, V8.MemoryHeapSampleMaximumCommitted) HM(heap_sample_maximum_committed, V8.MemoryHeapSampleMaximumCommitted)
// Note: These define both Histogram and AggregatedMemoryHistogram<Histogram>
// histograms with options (min=4000, max=2000000, buckets=100).
#define HISTOGRAM_MEMORY_LIST(HM) \
HM(memory_heap_committed, V8.MemoryHeapCommitted) \
HM(memory_heap_used, V8.MemoryHeapUsed)
// WARNING: STATS_COUNTER_LIST_* is a very large macro that is causing MSVC // WARNING: STATS_COUNTER_LIST_* is a very large macro that is causing MSVC
// Intellisense to crash. It was broken into two macros (each of length 40 // Intellisense to crash. It was broken into two macros (each of length 40
// lines) rather than one macro (of length about 80 lines) to work around // lines) rather than one macro (of length about 80 lines) to work around
...@@ -1476,14 +1470,6 @@ class Counters : public std::enable_shared_from_this<Counters> { ...@@ -1476,14 +1470,6 @@ class Counters : public std::enable_shared_from_this<Counters> {
#define HM(name, caption) \ #define HM(name, caption) \
Histogram* name() { return &name##_; } Histogram* name() { return &name##_; }
HISTOGRAM_LEGACY_MEMORY_LIST(HM) HISTOGRAM_LEGACY_MEMORY_LIST(HM)
HISTOGRAM_MEMORY_LIST(HM)
#undef HM
#define HM(name, caption) \
AggregatedMemoryHistogram<Histogram>* aggregated_##name() { \
return &aggregated_##name##_; \
}
HISTOGRAM_MEMORY_LIST(HM)
#undef HM #undef HM
#define SC(name, caption) \ #define SC(name, caption) \
...@@ -1511,7 +1497,6 @@ class Counters : public std::enable_shared_from_this<Counters> { ...@@ -1511,7 +1497,6 @@ class Counters : public std::enable_shared_from_this<Counters> {
#undef PERCENTAGE_ID #undef PERCENTAGE_ID
#define MEMORY_ID(name, caption) k_##name, #define MEMORY_ID(name, caption) k_##name,
HISTOGRAM_LEGACY_MEMORY_LIST(MEMORY_ID) HISTOGRAM_LEGACY_MEMORY_LIST(MEMORY_ID)
HISTOGRAM_MEMORY_LIST(MEMORY_ID)
#undef MEMORY_ID #undef MEMORY_ID
#define COUNTER_ID(name, caption) k_##name, #define COUNTER_ID(name, caption) k_##name,
STATS_COUNTER_LIST_1(COUNTER_ID) STATS_COUNTER_LIST_1(COUNTER_ID)
...@@ -1583,12 +1568,6 @@ class Counters : public std::enable_shared_from_this<Counters> { ...@@ -1583,12 +1568,6 @@ class Counters : public std::enable_shared_from_this<Counters> {
#define HM(name, caption) \ #define HM(name, caption) \
Histogram name##_; Histogram name##_;
HISTOGRAM_LEGACY_MEMORY_LIST(HM) HISTOGRAM_LEGACY_MEMORY_LIST(HM)
HISTOGRAM_MEMORY_LIST(HM)
#undef HM
#define HM(name, caption) \
AggregatedMemoryHistogram<Histogram> aggregated_##name##_;
HISTOGRAM_MEMORY_LIST(HM)
#undef HM #undef HM
#define SC(name, caption) \ #define SC(name, caption) \
......
...@@ -253,9 +253,6 @@ void GCTracer::Start(GarbageCollector collector, ...@@ -253,9 +253,6 @@ void GCTracer::Start(GarbageCollector collector,
current_.scopes[i] = 0; current_.scopes[i] = 0;
} }
size_t committed_memory = heap_->CommittedMemory() / KB;
size_t used_memory = current_.start_object_size / KB;
Counters* counters = heap_->isolate()->counters(); Counters* counters = heap_->isolate()->counters();
if (Heap::IsYoungGenerationCollector(collector)) { if (Heap::IsYoungGenerationCollector(collector)) {
...@@ -263,9 +260,6 @@ void GCTracer::Start(GarbageCollector collector, ...@@ -263,9 +260,6 @@ void GCTracer::Start(GarbageCollector collector,
} else { } else {
counters->mark_compact_reason()->AddSample(static_cast<int>(gc_reason)); counters->mark_compact_reason()->AddSample(static_cast<int>(gc_reason));
} }
counters->aggregated_memory_heap_committed()->AddSample(start_time,
committed_memory);
counters->aggregated_memory_heap_used()->AddSample(start_time, used_memory);
} }
void GCTracer::ResetIncrementalMarkingCounters() { void GCTracer::ResetIncrementalMarkingCounters() {
...@@ -305,13 +299,6 @@ void GCTracer::Stop(GarbageCollector collector) { ...@@ -305,13 +299,6 @@ void GCTracer::Stop(GarbageCollector collector) {
AddAllocation(current_.end_time); AddAllocation(current_.end_time);
size_t committed_memory = heap_->CommittedMemory() / KB;
size_t used_memory = current_.end_object_size / KB;
heap_->isolate()->counters()->aggregated_memory_heap_committed()->AddSample(
current_.end_time, committed_memory);
heap_->isolate()->counters()->aggregated_memory_heap_used()->AddSample(
current_.end_time, used_memory);
double duration = current_.end_time - current_.start_time; double duration = current_.end_time - current_.start_time;
switch (current_.type) { switch (current_.type) {
......
...@@ -3389,16 +3389,6 @@ void Heap::IdleNotificationEpilogue(GCIdleTimeAction action, ...@@ -3389,16 +3389,6 @@ void Heap::IdleNotificationEpilogue(GCIdleTimeAction action,
contexts_disposed_ = 0; contexts_disposed_ = 0;
if (deadline_in_ms - start_ms >
GCIdleTimeHandler::kMaxFrameRenderingIdleTime) {
int committed_memory = static_cast<int>(CommittedMemory() / KB);
int used_memory = static_cast<int>(heap_state.size_of_objects / KB);
isolate()->counters()->aggregated_memory_heap_committed()->AddSample(
start_ms, committed_memory);
isolate()->counters()->aggregated_memory_heap_used()->AddSample(
start_ms, used_memory);
}
if ((FLAG_trace_idle_notification && action.type > DO_NOTHING) || if ((FLAG_trace_idle_notification && action.type > DO_NOTHING) ||
FLAG_trace_idle_notification_verbose) { FLAG_trace_idle_notification_verbose) {
isolate_->PrintWithTimestamp( isolate_->PrintWithTimestamp(
......
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