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

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

Issue 1391473002: Add Metrics for heap high water marks (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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/metrics.h ('k') | runtime/vm/pages.h » ('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 #include "vm/metrics.h" 5 #include "vm/metrics.h"
6 6
7 #include "vm/isolate.h" 7 #include "vm/isolate.h"
8 #include "vm/json_stream.h" 8 #include "vm/json_stream.h"
9 #include "vm/native_entry.h" 9 #include "vm/native_entry.h"
10 #include "vm/runtime_entry.h" 10 #include "vm/runtime_entry.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 OS::Print("Printing metrics for VM\n"); 300 OS::Print("Printing metrics for VM\n");
301 Metric* current = Metric::vm_head(); 301 Metric* current = Metric::vm_head();
302 while (current != NULL) { 302 while (current != NULL) {
303 OS::Print("%s\n", current->ToString()); 303 OS::Print("%s\n", current->ToString());
304 current = current->next(); 304 current = current->next();
305 } 305 }
306 OS::Print("\n"); 306 OS::Print("\n");
307 } 307 }
308 } 308 }
309 309
310
311 MaxMetric::MaxMetric()
312 : Metric() {
313 set_value(kMinInt64);
314 }
315
316
317 void MaxMetric::SetValue(int64_t new_value) {
318 if (new_value > value()) {
319 set_value(new_value);
320 }
321 }
322
323
324 MinMetric::MinMetric()
325 : Metric() {
326 set_value(kMaxInt64);
327 }
328
329
330 void MinMetric::SetValue(int64_t new_value) {
331 if (new_value < value()) {
332 set_value(new_value);
333 }
334 }
335
310 } // namespace dart 336 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/metrics.h ('k') | runtime/vm/pages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698