| 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 #undef PRINT_COUNTER | 334 #undef PRINT_COUNTER |
| 335 | 335 |
| 336 #define PRINT_COUNTER(name) entries.Add(&this->Handler_##name); | 336 #define PRINT_COUNTER(name) entries.Add(&this->Handler_##name); |
| 337 FOR_EACH_HANDLER_COUNTER(PRINT_COUNTER) | 337 FOR_EACH_HANDLER_COUNTER(PRINT_COUNTER) |
| 338 #undef PRINT_COUNTER | 338 #undef PRINT_COUNTER |
| 339 | 339 |
| 340 entries.Print(os); | 340 entries.Print(os); |
| 341 } | 341 } |
| 342 | 342 |
| 343 void RuntimeCallStats::Reset() { | 343 void RuntimeCallStats::Reset() { |
| 344 if (!FLAG_runtime_call_stats && | 344 if (!IsEnabled()) return; |
| 345 !TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED()) | |
| 346 return; | |
| 347 #define RESET_COUNTER(name) this->name.Reset(); | 345 #define RESET_COUNTER(name) this->name.Reset(); |
| 348 FOR_EACH_MANUAL_COUNTER(RESET_COUNTER) | 346 FOR_EACH_MANUAL_COUNTER(RESET_COUNTER) |
| 349 #undef RESET_COUNTER | 347 #undef RESET_COUNTER |
| 350 | 348 |
| 351 #define RESET_COUNTER(name, nargs, result_size) this->Runtime_##name.Reset(); | 349 #define RESET_COUNTER(name, nargs, result_size) this->Runtime_##name.Reset(); |
| 352 FOR_EACH_INTRINSIC(RESET_COUNTER) | 350 FOR_EACH_INTRINSIC(RESET_COUNTER) |
| 353 #undef RESET_COUNTER | 351 #undef RESET_COUNTER |
| 354 | 352 |
| 355 #define RESET_COUNTER(name) this->Builtin_##name.Reset(); | 353 #define RESET_COUNTER(name) this->Builtin_##name.Reset(); |
| 356 BUILTIN_LIST_C(RESET_COUNTER) | 354 BUILTIN_LIST_C(RESET_COUNTER) |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 #define DUMP_COUNTER(name) \ | 389 #define DUMP_COUNTER(name) \ |
| 392 if (this->Handler_##name.count > 0) this->Handler_##name.Dump(value); | 390 if (this->Handler_##name.count > 0) this->Handler_##name.Dump(value); |
| 393 FOR_EACH_HANDLER_COUNTER(DUMP_COUNTER) | 391 FOR_EACH_HANDLER_COUNTER(DUMP_COUNTER) |
| 394 #undef DUMP_COUNTER | 392 #undef DUMP_COUNTER |
| 395 | 393 |
| 396 in_use_ = false; | 394 in_use_ = false; |
| 397 } | 395 } |
| 398 | 396 |
| 399 } // namespace internal | 397 } // namespace internal |
| 400 } // namespace v8 | 398 } // namespace v8 |
| OLD | NEW |