OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/counters.h" | 5 #include "src/counters.h" |
6 | 6 |
7 #include <iomanip> | 7 #include <iomanip> |
8 | 8 |
9 #include "src/base/platform/platform.h" | 9 #include "src/base/platform/platform.h" |
10 #include "src/isolate.h" | 10 #include "src/isolate.h" |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 #undef PRINT_COUNTER | 337 #undef PRINT_COUNTER |
338 | 338 |
339 #define PRINT_COUNTER(name) entries.Add(&this->Handler_##name); | 339 #define PRINT_COUNTER(name) entries.Add(&this->Handler_##name); |
340 FOR_EACH_HANDLER_COUNTER(PRINT_COUNTER) | 340 FOR_EACH_HANDLER_COUNTER(PRINT_COUNTER) |
341 #undef PRINT_COUNTER | 341 #undef PRINT_COUNTER |
342 | 342 |
343 entries.Print(os); | 343 entries.Print(os); |
344 } | 344 } |
345 | 345 |
346 void RuntimeCallStats::Reset() { | 346 void RuntimeCallStats::Reset() { |
347 if (V8_LIKELY(FLAG_runtime_stats == 0)) return; | 347 if (!FLAG_runtime_call_stats && |
348 | 348 !TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED()) |
| 349 return; |
349 #define RESET_COUNTER(name) this->name.Reset(); | 350 #define RESET_COUNTER(name) this->name.Reset(); |
350 FOR_EACH_MANUAL_COUNTER(RESET_COUNTER) | 351 FOR_EACH_MANUAL_COUNTER(RESET_COUNTER) |
351 #undef RESET_COUNTER | 352 #undef RESET_COUNTER |
352 | 353 |
353 #define RESET_COUNTER(name, nargs, result_size) this->Runtime_##name.Reset(); | 354 #define RESET_COUNTER(name, nargs, result_size) this->Runtime_##name.Reset(); |
354 FOR_EACH_INTRINSIC(RESET_COUNTER) | 355 FOR_EACH_INTRINSIC(RESET_COUNTER) |
355 #undef RESET_COUNTER | 356 #undef RESET_COUNTER |
356 | 357 |
357 #define RESET_COUNTER(name) this->Builtin_##name.Reset(); | 358 #define RESET_COUNTER(name) this->Builtin_##name.Reset(); |
358 BUILTIN_LIST_C(RESET_COUNTER) | 359 BUILTIN_LIST_C(RESET_COUNTER) |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 #define DUMP_COUNTER(name) \ | 397 #define DUMP_COUNTER(name) \ |
397 if (this->Handler_##name.count > 0) this->Handler_##name.Dump(value); | 398 if (this->Handler_##name.count > 0) this->Handler_##name.Dump(value); |
398 FOR_EACH_HANDLER_COUNTER(DUMP_COUNTER) | 399 FOR_EACH_HANDLER_COUNTER(DUMP_COUNTER) |
399 #undef DUMP_COUNTER | 400 #undef DUMP_COUNTER |
400 | 401 |
401 in_use_ = false; | 402 in_use_ = false; |
402 } | 403 } |
403 | 404 |
404 } // namespace internal | 405 } // namespace internal |
405 } // namespace v8 | 406 } // namespace v8 |
OLD | NEW |