Skip to content

Commit 87575b2

Browse files
[vm] Remove --trace_optimized_ic_calls.
TEST=ci Bug: #54377 Change-Id: Ibd3b2d05de241dffe3fa99b5d3a54cd20e0c4fdd Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433041 Reviewed-by: Alexander Aprelev <[email protected]>
1 parent 47f7c4f commit 87575b2

File tree

9 files changed

+1144
-1215
lines changed

9 files changed

+1144
-1215
lines changed

runtime/vm/compiler/runtime_offsets_extracted.h

Lines changed: 1144 additions & 1144 deletions
Large diffs are not rendered by default.

runtime/vm/compiler/stub_code_compiler_arm.cc

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2185,22 +2185,11 @@ void StubCodeCompiler::GenerateCallClosureNoSuchMethodStub() {
21852185
// Cannot use function object from ICData as it may be the inlined
21862186
// function and not the top-scope function.
21872187
void StubCodeCompiler::GenerateOptimizedUsageCounterIncrement() {
2188-
Register ic_reg = R9;
21892188
Register func_reg = R8;
21902189
if (FLAG_precompiled_mode) {
21912190
__ Breakpoint();
21922191
return;
21932192
}
2194-
if (FLAG_trace_optimized_ic_calls) {
2195-
__ EnterStubFrame();
2196-
__ PushList((1 << R9) | (1 << R8)); // Preserve.
2197-
__ Push(ic_reg); // Argument.
2198-
__ Push(func_reg); // Argument.
2199-
__ CallRuntime(kTraceICCallRuntimeEntry, 2);
2200-
__ Drop(2); // Discard argument;
2201-
__ PopList((1 << R9) | (1 << R8)); // Restore.
2202-
__ LeaveStubFrame();
2203-
}
22042193
__ ldr(TMP, FieldAddress(func_reg, target::Function::usage_counter_offset()));
22052194
__ add(TMP, TMP, Operand(1));
22062195
__ str(TMP, FieldAddress(func_reg, target::Function::usage_counter_offset()));

runtime/vm/compiler/stub_code_compiler_arm64.cc

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2592,24 +2592,11 @@ void StubCodeCompiler::GenerateCallClosureNoSuchMethodStub() {
25922592
// Cannot use function object from ICData as it may be the inlined
25932593
// function and not the top-scope function.
25942594
void StubCodeCompiler::GenerateOptimizedUsageCounterIncrement() {
2595-
Register ic_reg = R5;
25962595
Register func_reg = R6;
25972596
if (FLAG_precompiled_mode) {
25982597
__ Breakpoint();
25992598
return;
26002599
}
2601-
if (FLAG_trace_optimized_ic_calls) {
2602-
__ EnterStubFrame();
2603-
__ Push(R6); // Preserve.
2604-
__ Push(R5); // Preserve.
2605-
__ Push(ic_reg); // Argument.
2606-
__ Push(func_reg); // Argument.
2607-
__ CallRuntime(kTraceICCallRuntimeEntry, 2);
2608-
__ Drop(2); // Discard argument;
2609-
__ Pop(R5); // Restore.
2610-
__ Pop(R6); // Restore.
2611-
__ LeaveStubFrame();
2612-
}
26132600
__ LoadFieldFromOffset(R7, func_reg, target::Function::usage_counter_offset(),
26142601
kFourBytes);
26152602
__ add(R7, R7, Operand(1));

runtime/vm/compiler/stub_code_compiler_ia32.cc

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1935,21 +1935,7 @@ void StubCodeCompiler::GenerateCallClosureNoSuchMethodStub() {
19351935
// Cannot use function object from ICData as it may be the inlined
19361936
// function and not the top-scope function.
19371937
void StubCodeCompiler::GenerateOptimizedUsageCounterIncrement() {
1938-
Register ic_reg = ECX;
19391938
Register func_reg = EAX;
1940-
if (FLAG_trace_optimized_ic_calls) {
1941-
__ EnterStubFrame();
1942-
__ pushl(func_reg); // Preserve
1943-
__ pushl(ic_reg); // Preserve.
1944-
__ pushl(ic_reg); // Argument.
1945-
__ pushl(func_reg); // Argument.
1946-
__ CallRuntime(kTraceICCallRuntimeEntry, 2);
1947-
__ popl(EAX); // Discard argument;
1948-
__ popl(EAX); // Discard argument;
1949-
__ popl(ic_reg); // Restore.
1950-
__ popl(func_reg); // Restore.
1951-
__ LeaveFrame();
1952-
}
19531939
__ incl(FieldAddress(func_reg, target::Function::usage_counter_offset()));
19541940
}
19551941

runtime/vm/compiler/stub_code_compiler_riscv.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2186,9 +2186,6 @@ void StubCodeCompiler::GenerateOptimizedUsageCounterIncrement() {
21862186
__ Breakpoint();
21872187
return;
21882188
}
2189-
if (FLAG_trace_optimized_ic_calls) {
2190-
__ Stop("Unimplemented");
2191-
}
21922189
__ LoadFieldFromOffset(TMP, A6, target::Function::usage_counter_offset(),
21932190
kFourBytes);
21942191
__ addi(TMP, TMP, 1);

runtime/vm/compiler/stub_code_compiler_x64.cc

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2498,21 +2498,7 @@ void StubCodeCompiler::GenerateOptimizedUsageCounterIncrement() {
24982498
__ Breakpoint();
24992499
return;
25002500
}
2501-
Register ic_reg = RBX;
25022501
Register func_reg = RDI;
2503-
if (FLAG_trace_optimized_ic_calls) {
2504-
__ EnterStubFrame();
2505-
__ pushq(func_reg); // Preserve
2506-
__ pushq(ic_reg); // Preserve.
2507-
__ pushq(ic_reg); // Argument.
2508-
__ pushq(func_reg); // Argument.
2509-
__ CallRuntime(kTraceICCallRuntimeEntry, 2);
2510-
__ popq(RAX); // Discard argument;
2511-
__ popq(RAX); // Discard argument;
2512-
__ popq(ic_reg); // Restore.
2513-
__ popq(func_reg); // Restore.
2514-
__ LeaveStubFrame();
2515-
}
25162502
__ incl(FieldAddress(func_reg, target::Function::usage_counter_offset()));
25172503
}
25182504

runtime/vm/flag_list.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,6 @@ constexpr bool FLAG_support_il_printer = false;
213213
D(trace_type_checks_verbose, bool, false, \
214214
"Enable verbose trace of runtime type checks.") \
215215
D(trace_patching, bool, false, "Trace patching of code.") \
216-
D(trace_optimized_ic_calls, bool, false, \
217-
"Trace IC calls in optimized code.") \
218216
D(trace_zones, bool, false, "Traces allocation sizes in the zone.") \
219217
P(truncating_left_shift, bool, true, \
220218
"Optimize left shift to truncate if possible") \

runtime/vm/runtime_entry.cc

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3570,19 +3570,6 @@ DEFINE_RUNTIME_ENTRY(InterruptOrStackOverflow, 0) {
35703570
#endif // !defined(DART_PRECOMPILED_RUNTIME)
35713571
}
35723572

3573-
DEFINE_RUNTIME_ENTRY(TraceICCall, 2) {
3574-
const ICData& ic_data = ICData::CheckedHandle(zone, arguments.ArgAt(0));
3575-
const Function& function = Function::CheckedHandle(zone, arguments.ArgAt(1));
3576-
DartFrameIterator iterator(thread,
3577-
StackFrameIterator::kNoCrossThreadIteration);
3578-
StackFrame* frame = iterator.NextFrame();
3579-
ASSERT(frame != nullptr);
3580-
OS::PrintErr(
3581-
"IC call @%#" Px ": ICData: %#" Px " cnt:%" Pd " nchecks: %" Pd " %s\n",
3582-
frame->pc(), static_cast<uword>(ic_data.ptr()), function.usage_counter(),
3583-
ic_data.NumberOfChecks(), function.ToFullyQualifiedCString());
3584-
}
3585-
35863573
// Compile a function. Should call only if the function has not been compiled.
35873574
// Arg0: function object.
35883575
DEFINE_RUNTIME_ENTRY(CompileFunction, 1) {

runtime/vm/runtime_entry_list.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ namespace dart {
4444
V(NoSuchMethodFromCallStub) \
4545
V(NoSuchMethodFromPrologue) \
4646
V(OptimizeInvokedFunction) \
47-
V(TraceICCall) \
4847
V(PatchStaticCall) \
4948
V(RangeError) \
5049
V(RangeErrorUnboxedInt64) \

0 commit comments

Comments
 (0)