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

Side by Side Diff: runtime/vm/metrics.h

Issue 2146713004: More changes to use #ifndef PRODUCT ... #endif explicitly instead of relying on compiler magic. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 months 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/metrics.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_METRICS_H_ 5 #ifndef VM_METRICS_H_
6 #define VM_METRICS_H_ 6 #define VM_METRICS_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 const char* description, 49 const char* description,
50 Unit unit); 50 Unit unit);
51 51
52 // Initialize and register a metric for the VM. 52 // Initialize and register a metric for the VM.
53 void Init(const char* name, 53 void Init(const char* name,
54 const char* description, 54 const char* description,
55 Unit unit); 55 Unit unit);
56 56
57 virtual ~Metric(); 57 virtual ~Metric();
58 58
59 #ifndef PRODUCT
59 void PrintJSON(JSONStream* stream); 60 void PrintJSON(JSONStream* stream);
61 #endif // !PRODUCT
60 62
61 // Returns a zone allocated string. 63 // Returns a zone allocated string.
62 static char* ValueToString(int64_t value, Unit unit); 64 static char* ValueToString(int64_t value, Unit unit);
63 65
64 // Returns a zone allocated string. 66 // Returns a zone allocated string.
65 char* ToString(); 67 char* ToString();
66 68
67 int64_t value() const { return value_; } 69 int64_t value() const { return value_; }
68 void set_value(int64_t value) { value_ = value; } 70 void set_value(int64_t value) { value_ = value; }
69 71
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 173
172 174
173 class MetricHeapUsed : public Metric { 175 class MetricHeapUsed : public Metric {
174 protected: 176 protected:
175 virtual int64_t Value() const; 177 virtual int64_t Value() const;
176 }; 178 };
177 179
178 } // namespace dart 180 } // namespace dart
179 181
180 #endif // VM_METRICS_H_ 182 #endif // VM_METRICS_H_
OLDNEW
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698