Commit eca64a2a authored by jkummerow's avatar jkummerow Committed by Commit bot

[ic] Drop TimerEventScopes from *IC_Miss runtime functions

This is mostly a performance experiment. If it provides no speedup,
it can be reverted to keep IC miss events in timeline plots.
Otherwise, the RuntimeCallStats system is the replacement tool for
investigating performance issues related to IC misses.

This effectively reverts 1f8adc15 / r21736.

Review-Url: https://codereview.chromium.org/2480343002
Cr-Commit-Position: refs/heads/master@{#40893}
parent d5f22440
...@@ -2541,7 +2541,6 @@ void CallIC::HandleMiss(Handle<Object> function) { ...@@ -2541,7 +2541,6 @@ void CallIC::HandleMiss(Handle<Object> function) {
// Used from ic-<arch>.cc. // Used from ic-<arch>.cc.
RUNTIME_FUNCTION(Runtime_CallIC_Miss) { RUNTIME_FUNCTION(Runtime_CallIC_Miss) {
TimerEventScope<TimerEventIcMiss> timer(isolate);
HandleScope scope(isolate); HandleScope scope(isolate);
DCHECK_EQ(3, args.length()); DCHECK_EQ(3, args.length());
// Runtime functions don't follow the IC's calling convention. // Runtime functions don't follow the IC's calling convention.
...@@ -2558,7 +2557,6 @@ RUNTIME_FUNCTION(Runtime_CallIC_Miss) { ...@@ -2558,7 +2557,6 @@ RUNTIME_FUNCTION(Runtime_CallIC_Miss) {
// Used from ic-<arch>.cc. // Used from ic-<arch>.cc.
RUNTIME_FUNCTION(Runtime_LoadIC_Miss) { RUNTIME_FUNCTION(Runtime_LoadIC_Miss) {
TimerEventScope<TimerEventIcMiss> timer(isolate);
HandleScope scope(isolate); HandleScope scope(isolate);
DCHECK_EQ(4, args.length()); DCHECK_EQ(4, args.length());
// Runtime functions don't follow the IC's calling convention. // Runtime functions don't follow the IC's calling convention.
...@@ -2598,7 +2596,6 @@ RUNTIME_FUNCTION(Runtime_LoadIC_Miss) { ...@@ -2598,7 +2596,6 @@ RUNTIME_FUNCTION(Runtime_LoadIC_Miss) {
// Used from ic-<arch>.cc. // Used from ic-<arch>.cc.
RUNTIME_FUNCTION(Runtime_LoadGlobalIC_Miss) { RUNTIME_FUNCTION(Runtime_LoadGlobalIC_Miss) {
TimerEventScope<TimerEventIcMiss> timer(isolate);
HandleScope scope(isolate); HandleScope scope(isolate);
DCHECK_EQ(2, args.length()); DCHECK_EQ(2, args.length());
// Runtime functions don't follow the IC's calling convention. // Runtime functions don't follow the IC's calling convention.
...@@ -2670,7 +2667,6 @@ RUNTIME_FUNCTION(Runtime_LoadGlobalIC_Slow) { ...@@ -2670,7 +2667,6 @@ RUNTIME_FUNCTION(Runtime_LoadGlobalIC_Slow) {
// Used from ic-<arch>.cc // Used from ic-<arch>.cc
RUNTIME_FUNCTION(Runtime_KeyedLoadIC_Miss) { RUNTIME_FUNCTION(Runtime_KeyedLoadIC_Miss) {
TimerEventScope<TimerEventIcMiss> timer(isolate);
HandleScope scope(isolate); HandleScope scope(isolate);
DCHECK_EQ(4, args.length()); DCHECK_EQ(4, args.length());
// Runtime functions don't follow the IC's calling convention. // Runtime functions don't follow the IC's calling convention.
...@@ -2687,7 +2683,6 @@ RUNTIME_FUNCTION(Runtime_KeyedLoadIC_Miss) { ...@@ -2687,7 +2683,6 @@ RUNTIME_FUNCTION(Runtime_KeyedLoadIC_Miss) {
RUNTIME_FUNCTION(Runtime_KeyedLoadIC_MissFromStubFailure) { RUNTIME_FUNCTION(Runtime_KeyedLoadIC_MissFromStubFailure) {
TimerEventScope<TimerEventIcMiss> timer(isolate);
HandleScope scope(isolate); HandleScope scope(isolate);
typedef LoadWithVectorDescriptor Descriptor; typedef LoadWithVectorDescriptor Descriptor;
DCHECK_EQ(Descriptor::kParameterCount, args.length()); DCHECK_EQ(Descriptor::kParameterCount, args.length());
...@@ -2706,7 +2701,6 @@ RUNTIME_FUNCTION(Runtime_KeyedLoadIC_MissFromStubFailure) { ...@@ -2706,7 +2701,6 @@ RUNTIME_FUNCTION(Runtime_KeyedLoadIC_MissFromStubFailure) {
// Used from ic-<arch>.cc. // Used from ic-<arch>.cc.
RUNTIME_FUNCTION(Runtime_StoreIC_Miss) { RUNTIME_FUNCTION(Runtime_StoreIC_Miss) {
TimerEventScope<TimerEventIcMiss> timer(isolate);
HandleScope scope(isolate); HandleScope scope(isolate);
DCHECK_EQ(5, args.length()); DCHECK_EQ(5, args.length());
// Runtime functions don't follow the IC's calling convention. // Runtime functions don't follow the IC's calling convention.
...@@ -2734,7 +2728,6 @@ RUNTIME_FUNCTION(Runtime_StoreIC_Miss) { ...@@ -2734,7 +2728,6 @@ RUNTIME_FUNCTION(Runtime_StoreIC_Miss) {
// Used from ic-<arch>.cc. // Used from ic-<arch>.cc.
RUNTIME_FUNCTION(Runtime_KeyedStoreIC_Miss) { RUNTIME_FUNCTION(Runtime_KeyedStoreIC_Miss) {
TimerEventScope<TimerEventIcMiss> timer(isolate);
HandleScope scope(isolate); HandleScope scope(isolate);
DCHECK_EQ(5, args.length()); DCHECK_EQ(5, args.length());
// Runtime functions don't follow the IC's calling convention. // Runtime functions don't follow the IC's calling convention.
...@@ -2770,7 +2763,6 @@ RUNTIME_FUNCTION(Runtime_KeyedStoreIC_Slow) { ...@@ -2770,7 +2763,6 @@ RUNTIME_FUNCTION(Runtime_KeyedStoreIC_Slow) {
RUNTIME_FUNCTION(Runtime_ElementsTransitionAndStoreIC_Miss) { RUNTIME_FUNCTION(Runtime_ElementsTransitionAndStoreIC_Miss) {
TimerEventScope<TimerEventIcMiss> timer(isolate);
HandleScope scope(isolate); HandleScope scope(isolate);
// Runtime functions don't follow the IC's calling convention. // Runtime functions don't follow the IC's calling convention.
Handle<Object> object = args.at<Object>(0); Handle<Object> object = args.at<Object>(0);
...@@ -2909,7 +2901,6 @@ MaybeHandle<Object> BinaryOpIC::Transition( ...@@ -2909,7 +2901,6 @@ MaybeHandle<Object> BinaryOpIC::Transition(
RUNTIME_FUNCTION(Runtime_BinaryOpIC_Miss) { RUNTIME_FUNCTION(Runtime_BinaryOpIC_Miss) {
TimerEventScope<TimerEventIcMiss> timer(isolate);
HandleScope scope(isolate); HandleScope scope(isolate);
DCHECK_EQ(2, args.length()); DCHECK_EQ(2, args.length());
typedef BinaryOpDescriptor Descriptor; typedef BinaryOpDescriptor Descriptor;
...@@ -2922,7 +2913,6 @@ RUNTIME_FUNCTION(Runtime_BinaryOpIC_Miss) { ...@@ -2922,7 +2913,6 @@ RUNTIME_FUNCTION(Runtime_BinaryOpIC_Miss) {
RUNTIME_FUNCTION(Runtime_BinaryOpIC_MissWithAllocationSite) { RUNTIME_FUNCTION(Runtime_BinaryOpIC_MissWithAllocationSite) {
TimerEventScope<TimerEventIcMiss> timer(isolate);
HandleScope scope(isolate); HandleScope scope(isolate);
DCHECK_EQ(3, args.length()); DCHECK_EQ(3, args.length());
typedef BinaryOpWithAllocationSiteDescriptor Descriptor; typedef BinaryOpWithAllocationSiteDescriptor Descriptor;
...@@ -2986,7 +2976,6 @@ Code* CompareIC::UpdateCaches(Handle<Object> x, Handle<Object> y) { ...@@ -2986,7 +2976,6 @@ Code* CompareIC::UpdateCaches(Handle<Object> x, Handle<Object> y) {
// Used from CompareICStub::GenerateMiss in code-stubs-<arch>.cc. // Used from CompareICStub::GenerateMiss in code-stubs-<arch>.cc.
RUNTIME_FUNCTION(Runtime_CompareIC_Miss) { RUNTIME_FUNCTION(Runtime_CompareIC_Miss) {
TimerEventScope<TimerEventIcMiss> timer(isolate);
HandleScope scope(isolate); HandleScope scope(isolate);
DCHECK(args.length() == 3); DCHECK(args.length() == 3);
CompareIC ic(isolate, static_cast<Token::Value>(args.smi_at(2))); CompareIC ic(isolate, static_cast<Token::Value>(args.smi_at(2)));
...@@ -3011,7 +3000,6 @@ Handle<Object> ToBooleanIC::ToBoolean(Handle<Object> object) { ...@@ -3011,7 +3000,6 @@ Handle<Object> ToBooleanIC::ToBoolean(Handle<Object> object) {
RUNTIME_FUNCTION(Runtime_ToBooleanIC_Miss) { RUNTIME_FUNCTION(Runtime_ToBooleanIC_Miss) {
TimerEventScope<TimerEventIcMiss> timer(isolate);
DCHECK(args.length() == 1); DCHECK(args.length() == 1);
HandleScope scope(isolate); HandleScope scope(isolate);
Handle<Object> object = args.at<Object>(0); Handle<Object> object = args.at<Object>(0);
......
...@@ -341,8 +341,7 @@ class Logger : public CodeEventListener { ...@@ -341,8 +341,7 @@ class Logger : public CodeEventListener {
V(CompileCode, true) \ V(CompileCode, true) \
V(DeoptimizeCode, true) \ V(DeoptimizeCode, true) \
V(Execute, true) \ V(Execute, true) \
V(External, true) \ V(External, true)
V(IcMiss, false)
#define V(TimerName, expose) \ #define V(TimerName, expose) \
class TimerEvent##TimerName : public AllStatic { \ class TimerEvent##TimerName : public AllStatic { \
......
...@@ -216,8 +216,12 @@ var assertMatches; ...@@ -216,8 +216,12 @@ var assertMatches;
message += " (" + name_opt + ")"; message += " (" + name_opt + ")";
} }
message += ": expected <" + expectedText + var foundText = PrettyPrint(found);
"> found <" + PrettyPrint(found) + ">"; if (expectedText.length <= 40 && foundText.length <= 40) {
message += ": expected <" + expectedText + "> found <" + foundText + ">";
} else {
message += ":\nexpected:\n" + expectedText + "\nfound:\n" + foundText;
}
throw new MjsUnitAssertionError(message); throw new MjsUnitAssertionError(message);
} }
......
This diff is collapsed.
...@@ -78,6 +78,5 @@ var create_baseline = false; ...@@ -78,6 +78,5 @@ var create_baseline = false;
if (create_baseline) { if (create_baseline) {
print(JSON.stringify(output_lines, null, 2)); print(JSON.stringify(output_lines, null, 2));
} else { } else {
assertArrayEquals(output_lines, assertArrayEquals(JSON.parse(read(reference_file)), output_lines);
JSON.parse(read(reference_file)));
} }
...@@ -106,8 +106,6 @@ function PlotScriptComposer(kResX, kResY, error_output) { ...@@ -106,8 +106,6 @@ function PlotScriptComposer(kResX, kResY, error_output) {
new TimerEvent("recompile async", "#CC4499", false, 1), new TimerEvent("recompile async", "#CC4499", false, 1),
'V8.CompileEvalMicroSeconds': 'V8.CompileEvalMicroSeconds':
new TimerEvent("compile eval", "#CC4400", true, 0), new TimerEvent("compile eval", "#CC4400", true, 0),
'V8.IcMiss':
new TimerEvent("ic miss", "#CC9900", false, 0),
'V8.ParseMicroSeconds': 'V8.ParseMicroSeconds':
new TimerEvent("parse", "#00CC00", true, 0), new TimerEvent("parse", "#00CC00", true, 0),
'V8.PreParseMicroSeconds': 'V8.PreParseMicroSeconds':
......
...@@ -30,10 +30,10 @@ var distortion_per_entry = 0; ...@@ -30,10 +30,10 @@ var distortion_per_entry = 0;
var range_start_override = undefined; var range_start_override = undefined;
var range_end_override = undefined; var range_end_override = undefined;
if (!processor.parse()) processor.printUsageAndExit();; if (!processor.parse()) processor.printUsageAndExit();
var result = processor.result(); var result = processor.result();
var distortion = parseInt(result.distortion); var distortion = parseInt(result.distortion);
if (isNaN(distortion)) processor.printUsageAndExit();; if (isNaN(distortion)) processor.printUsageAndExit();
// Convert picoseconds to milliseconds. // Convert picoseconds to milliseconds.
distortion_per_entry = distortion / 1000000; distortion_per_entry = distortion / 1000000;
var rangelimits = result.range.split(","); var rangelimits = result.range.split(",");
...@@ -43,7 +43,7 @@ if (!isNaN(range_start)) range_start_override = range_start; ...@@ -43,7 +43,7 @@ if (!isNaN(range_start)) range_start_override = range_start;
if (!isNaN(range_end)) range_end_override = range_end; if (!isNaN(range_end)) range_end_override = range_end;
var kResX = 1600; var kResX = 1600;
var kResY = 700; var kResY = 600;
function log_error(text) { function log_error(text) {
print(text); print(text);
quit(1); quit(1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment