Skip to content

Commit 2c78c64

Browse files
lavenzgfacebook-github-bot
authored andcommitted
Move dumpOpcodeStats() to jsi::Instrumentation (#53475)
Summary: Rollback Plan: Differential Revision: D81087047
1 parent 9e0d549 commit 2c78c64

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

packages/react-native/ReactCommon/jsi/jsi/decorator.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,10 @@ class RuntimeDecorator : public Base, private jsi::Instrumentation {
506506
.writeBasicBlockProfileTraceToFile(fileName);
507507
}
508508

509+
void dumpOpcodeStats(std::ostream& os) const override {
510+
const_cast<Plain&>(plain()).instrumentation().dumpOpcodeStats(os);
511+
}
512+
509513
/// Dump external profiler symbols to the given file name.
510514
void dumpProfilerSymbolsToFile(const std::string& fileName) const override {
511515
const_cast<Plain&>(plain()).instrumentation().dumpProfilerSymbolsToFile(

packages/react-native/ReactCommon/jsi/jsi/instrumentation.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ class JSI_EXPORT Instrumentation {
121121
virtual void writeBasicBlockProfileTraceToFile(
122122
const std::string& fileName) const = 0;
123123

124+
/// Write the opcode stats to the given stream.
125+
virtual void dumpOpcodeStats(std::ostream& os) const = 0;
126+
124127
/// Dump external profiler symbols to the given file name.
125128
virtual void dumpProfilerSymbolsToFile(const std::string& fileName) const = 0;
126129
};

packages/react-native/ReactCommon/jsi/jsi/jsi.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,10 @@ Instrumentation& Runtime::instrumentation() {
334334
std::abort();
335335
}
336336

337+
void dumpOpcodeStats(std::ostream&) const override {
338+
std::abort();
339+
}
340+
337341
void dumpProfilerSymbolsToFile(const std::string&) const override {
338342
std::abort();
339343
}

0 commit comments

Comments
 (0)