Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Unified Diff: runtime/vm/metrics.cc

Issue 2481873005: clang-format runtime/vm (Closed)
Patch Set: Merge Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/metrics.h ('k') | runtime/vm/metrics_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/metrics.cc
diff --git a/runtime/vm/metrics.cc b/runtime/vm/metrics.cc
index 137042e124f974f4936721da98c1a9fb3a73bfae..5a2f5a70319f784b3df3580f68844d73e1125051 100644
--- a/runtime/vm/metrics.cc
+++ b/runtime/vm/metrics.cc
@@ -13,7 +13,9 @@
namespace dart {
-DEFINE_FLAG(bool, print_metrics, false,
+DEFINE_FLAG(bool,
+ print_metrics,
+ false,
"Print metrics when isolates (and the VM) are shutdown.");
Metric* Metric::vm_list_head_ = NULL;
@@ -24,8 +26,7 @@ Metric::Metric()
description_(NULL),
unit_(kCounter),
value_(0),
- next_(NULL) {
-}
+ next_(NULL) {}
void Metric::Init(Isolate* isolate,
@@ -70,8 +71,10 @@ Metric::~Metric() {
#ifndef PRODUCT
static const char* UnitString(intptr_t unit) {
switch (unit) {
- case Metric::kCounter: return "counter";
- case Metric::kByte: return "byte";
+ case Metric::kCounter:
+ return "counter";
+ case Metric::kByte:
+ return "byte";
default:
UNREACHABLE();
}
@@ -122,10 +125,8 @@ char* Metric::ValueToString(int64_t value, Unit unit) {
scaled_suffix = "gb";
scaled_value /= GB;
}
- return zone->PrintToString("%.3f %s (%" Pd64 ")",
- scaled_value,
- scaled_suffix,
- value);
+ return zone->PrintToString("%.3f %s (%" Pd64 ")", scaled_value,
+ scaled_suffix, value);
}
default:
UNREACHABLE();
@@ -157,7 +158,6 @@ bool Metric::NameExists(Metric* head, const char* name) {
}
-
void Metric::RegisterWithIsolate() {
ASSERT(isolate_ != NULL);
ASSERT(next_ == NULL);
@@ -293,7 +293,7 @@ int64_t MetricIsolateCount::Value() const {
#define VM_METRIC_VARIABLE(type, variable, name, unit) \
static type vm_metric_##variable##_;
- VM_METRIC_LIST(VM_METRIC_VARIABLE);
+VM_METRIC_LIST(VM_METRIC_VARIABLE);
#undef VM_METRIC_VARIABLE
@@ -319,8 +319,7 @@ void Metric::Cleanup() {
}
-MaxMetric::MaxMetric()
- : Metric() {
+MaxMetric::MaxMetric() : Metric() {
set_value(kMinInt64);
}
@@ -332,8 +331,7 @@ void MaxMetric::SetValue(int64_t new_value) {
}
-MinMetric::MinMetric()
- : Metric() {
+MinMetric::MinMetric() : Metric() {
set_value(kMaxInt64);
}
« no previous file with comments | « runtime/vm/metrics.h ('k') | runtime/vm/metrics_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698