| Index: src/code-stubs.cc
|
| diff --git a/src/code-stubs.cc b/src/code-stubs.cc
|
| index f0f38ebe9376962df326dab42cc1abff0f67958a..3070dac9dd1f95bf7c9a85fb5f41d9a95b3f8d64 100644
|
| --- a/src/code-stubs.cc
|
| +++ b/src/code-stubs.cc
|
| @@ -14,8 +14,10 @@
|
| #include "src/gdb-jit.h"
|
| #include "src/ic/accessor-assembler.h"
|
| #include "src/ic/handler-compiler.h"
|
| +#include "src/ic/ic-stats.h"
|
| #include "src/ic/ic.h"
|
| #include "src/macro-assembler.h"
|
| +#include "src/tracing/tracing-category-observer.h"
|
|
|
| namespace v8 {
|
| namespace internal {
|
| @@ -2290,7 +2292,19 @@ void HydrogenCodeStub::TraceTransition(StateType from, StateType to) {
|
| // Note: Although a no-op transition is semantically OK, it is hinting at a
|
| // bug somewhere in our state transition machinery.
|
| DCHECK(from != to);
|
| - if (!FLAG_trace_ic) return;
|
| + if (V8_LIKELY(!FLAG_ic_stats)) return;
|
| + if (FLAG_ic_stats &
|
| + v8::tracing::TracingCategoryObserver::ENABLED_BY_TRACING) {
|
| + auto ic_stats = ICStats::instance();
|
| + ic_stats->Begin();
|
| + ICInfo& ic_info = ic_stats->Current();
|
| + ic_info.type = MajorName(MajorKey());
|
| + ic_info.state = ToString(from);
|
| + ic_info.state += "=>";
|
| + ic_info.state += ToString(to);
|
| + ic_stats->End();
|
| + return;
|
| + }
|
| OFStream os(stdout);
|
| os << "[";
|
| PrintBaseName(os);
|
|
|