[2/4] kudu git commit: Remove tcmalloc_spinlock_contention metric
Remove tcmalloc_spinlock_contention metric Spinlock contention was removed from tcmalloc upstream, so this metric has been set to 0 since we upgraded to tcmalloc 2.6. I looked briefly at reverting its removal upstream, but the revert would be fairly large, so I think it's best to just accept the loss of this instrumentation. Change-Id: I2c29b81a2c692d5d876d2dd5381ba2c295684324 Reviewed-on: http://gerrit.cloudera.org:8080/9595 Tested-by: Todd Lipcon Reviewed-by: Adar Dembo (cherry picked from commit 4889a9156a7e1f51b076f4bc9f44621a1b2f46e4) Reviewed-on: http://gerrit.cloudera.org:8080/9608 Tested-by: Grant Henke Reviewed-by: Grant Henke Project: http://git-wip-us.apache.org/repos/asf/kudu/repo Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/9e20ca67 Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/9e20ca67 Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/9e20ca67 Branch: refs/heads/branch-1.7.x Commit: 9e20ca67020e3ec308fa831b9ca6f1475ce59255 Parents: 7eb1a9f Author: Todd Lipcon Authored: Mon Mar 12 17:26:19 2018 -0700 Committer: Grant Henke Committed: Tue Mar 13 21:18:27 2018 + -- docs/release_notes.adoc | 2 ++ src/kudu/scripts/parse_metrics_log.py| 1 - src/kudu/util/spinlock_profiling-test.cc | 10 -- src/kudu/util/spinlock_profiling.cc | 47 --- src/kudu/util/spinlock_profiling.h | 4 --- src/kudu/util/trace.h| 26 ++- src/kudu/util/trace_metrics.h| 20 ++-- 7 files changed, 7 insertions(+), 103 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kudu/blob/9e20ca67/docs/release_notes.adoc -- diff --git a/docs/release_notes.adoc b/docs/release_notes.adoc index 916282c..482dc83 100644 --- a/docs/release_notes.adoc +++ b/docs/release_notes.adoc @@ -40,6 +40,8 @@ [[rn_1.7.0_obsoletions]] == Obsoletions +* The `tcmalloc_contention_time` metric, which previously tracked the amount + of time spent in memory allocator lock contention, has been removed. [[rn_1.7.0_deprecations]] == Deprecations http://git-wip-us.apache.org/repos/asf/kudu/blob/9e20ca67/src/kudu/scripts/parse_metrics_log.py -- diff --git a/src/kudu/scripts/parse_metrics_log.py b/src/kudu/scripts/parse_metrics_log.py index 3b58991..75406ad 100644 --- a/src/kudu/scripts/parse_metrics_log.py +++ b/src/kudu/scripts/parse_metrics_log.py @@ -63,7 +63,6 @@ RATE_METRICS = [ # ("server.voluntary_context_switches", "vol_cs"), # ("tablet.rows_inserted", "inserts_per_sec"), # ("tablet.rows_upserted", "upserts_per_sec"), - # ("server.tcmalloc_contention_time", "tcmalloc_contention_time") ] # These metrics will be extracted as percentile metrics into the TSV. http://git-wip-us.apache.org/repos/asf/kudu/blob/9e20ca67/src/kudu/util/spinlock_profiling-test.cc -- diff --git a/src/kudu/util/spinlock_profiling-test.cc b/src/kudu/util/spinlock_profiling-test.cc index 5a9fd6b..28089df 100644 --- a/src/kudu/util/spinlock_profiling-test.cc +++ b/src/kudu/util/spinlock_profiling-test.cc @@ -43,10 +43,6 @@ namespace gutil { extern void SubmitSpinLockProfileData(const void *, int64); } // namespace gutil -namespace base { -extern void SubmitSpinLockProfileData(const void *, int64); -} // namespace base - namespace kudu { class SpinLockProfilingTest : public KuduTest {}; @@ -82,10 +78,4 @@ TEST_F(SpinLockProfilingTest, TestStackCollection) { ASSERT_EQ(0, dropped); } -TEST_F(SpinLockProfilingTest, TestTcmallocContention) { - StartSynchronizationProfiling(); - base::SubmitSpinLockProfileData(nullptr, 12345); - ASSERT_GE(GetTcmallocContentionMicros(), 0); -} - } // namespace kudu http://git-wip-us.apache.org/repos/asf/kudu/blob/9e20ca67/src/kudu/util/spinlock_profiling.cc -- diff --git a/src/kudu/util/spinlock_profiling.cc b/src/kudu/util/spinlock_profiling.cc index b6abf59..5660760 100644 --- a/src/kudu/util/spinlock_profiling.cc +++ b/src/kudu/util/spinlock_profiling.cc @@ -38,7 +38,6 @@ #include "kudu/util/metrics.h" #include "kudu/util/striped64.h" #include "kudu/util/trace.h" -#include "kudu/util/trace_metrics.h" DEFINE_int32(lock_contention_trace_threshold_cycles, 200, // 2M cycles should be about 1ms @@ -53,12 +52,6 @@ METRIC_DEFINE_gauge_uint64(server, spinlock_contention_time, "started. If this increases rapidly, it may indicate a performance issue in Kudu " "internals triggered by a particular workload and warrant investigation.", kudu::EXPOSE_AS_COUNTER); -METRIC_DEFINE_gauge_uint64(server, tcmalloc_contention_time, -
[2/4] kudu git commit: Remove tcmalloc_spinlock_contention metric
Remove tcmalloc_spinlock_contention metric Spinlock contention was removed from tcmalloc upstream, so this metric has been set to 0 since we upgraded to tcmalloc 2.6. I looked briefly at reverting its removal upstream, but the revert would be fairly large, so I think it's best to just accept the loss of this instrumentation. Change-Id: I2c29b81a2c692d5d876d2dd5381ba2c295684324 Reviewed-on: http://gerrit.cloudera.org:8080/9595 Tested-by: Todd Lipcon Reviewed-by: Adar Dembo Project: http://git-wip-us.apache.org/repos/asf/kudu/repo Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/4889a915 Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/4889a915 Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/4889a915 Branch: refs/heads/master Commit: 4889a9156a7e1f51b076f4bc9f44621a1b2f46e4 Parents: 13155d4 Author: Todd Lipcon Authored: Mon Mar 12 17:26:19 2018 -0700 Committer: Todd Lipcon Committed: Tue Mar 13 18:16:30 2018 + -- docs/release_notes.adoc | 2 ++ src/kudu/scripts/parse_metrics_log.py| 1 - src/kudu/util/spinlock_profiling-test.cc | 10 -- src/kudu/util/spinlock_profiling.cc | 47 --- src/kudu/util/spinlock_profiling.h | 4 --- src/kudu/util/trace.h| 26 ++- src/kudu/util/trace_metrics.h| 20 ++-- 7 files changed, 7 insertions(+), 103 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kudu/blob/4889a915/docs/release_notes.adoc -- diff --git a/docs/release_notes.adoc b/docs/release_notes.adoc index 916282c..482dc83 100644 --- a/docs/release_notes.adoc +++ b/docs/release_notes.adoc @@ -40,6 +40,8 @@ [[rn_1.7.0_obsoletions]] == Obsoletions +* The `tcmalloc_contention_time` metric, which previously tracked the amount + of time spent in memory allocator lock contention, has been removed. [[rn_1.7.0_deprecations]] == Deprecations http://git-wip-us.apache.org/repos/asf/kudu/blob/4889a915/src/kudu/scripts/parse_metrics_log.py -- diff --git a/src/kudu/scripts/parse_metrics_log.py b/src/kudu/scripts/parse_metrics_log.py index 3b58991..75406ad 100644 --- a/src/kudu/scripts/parse_metrics_log.py +++ b/src/kudu/scripts/parse_metrics_log.py @@ -63,7 +63,6 @@ RATE_METRICS = [ # ("server.voluntary_context_switches", "vol_cs"), # ("tablet.rows_inserted", "inserts_per_sec"), # ("tablet.rows_upserted", "upserts_per_sec"), - # ("server.tcmalloc_contention_time", "tcmalloc_contention_time") ] # These metrics will be extracted as percentile metrics into the TSV. http://git-wip-us.apache.org/repos/asf/kudu/blob/4889a915/src/kudu/util/spinlock_profiling-test.cc -- diff --git a/src/kudu/util/spinlock_profiling-test.cc b/src/kudu/util/spinlock_profiling-test.cc index 5a9fd6b..28089df 100644 --- a/src/kudu/util/spinlock_profiling-test.cc +++ b/src/kudu/util/spinlock_profiling-test.cc @@ -43,10 +43,6 @@ namespace gutil { extern void SubmitSpinLockProfileData(const void *, int64); } // namespace gutil -namespace base { -extern void SubmitSpinLockProfileData(const void *, int64); -} // namespace base - namespace kudu { class SpinLockProfilingTest : public KuduTest {}; @@ -82,10 +78,4 @@ TEST_F(SpinLockProfilingTest, TestStackCollection) { ASSERT_EQ(0, dropped); } -TEST_F(SpinLockProfilingTest, TestTcmallocContention) { - StartSynchronizationProfiling(); - base::SubmitSpinLockProfileData(nullptr, 12345); - ASSERT_GE(GetTcmallocContentionMicros(), 0); -} - } // namespace kudu http://git-wip-us.apache.org/repos/asf/kudu/blob/4889a915/src/kudu/util/spinlock_profiling.cc -- diff --git a/src/kudu/util/spinlock_profiling.cc b/src/kudu/util/spinlock_profiling.cc index b6abf59..5660760 100644 --- a/src/kudu/util/spinlock_profiling.cc +++ b/src/kudu/util/spinlock_profiling.cc @@ -38,7 +38,6 @@ #include "kudu/util/metrics.h" #include "kudu/util/striped64.h" #include "kudu/util/trace.h" -#include "kudu/util/trace_metrics.h" DEFINE_int32(lock_contention_trace_threshold_cycles, 200, // 2M cycles should be about 1ms @@ -53,12 +52,6 @@ METRIC_DEFINE_gauge_uint64(server, spinlock_contention_time, "started. If this increases rapidly, it may indicate a performance issue in Kudu " "internals triggered by a particular workload and warrant investigation.", kudu::EXPOSE_AS_COUNTER); -METRIC_DEFINE_gauge_uint64(server, tcmalloc_contention_time, -"TCMalloc Contention Time", kudu::MetricUnit::kMicroseconds, -"Amount of time consumed by contention on tcmalloc's locks since the server " -"started. If this incre