It is intentional that we only grow counter and never decrease it (even
when we
clear ICs or even discard code?)
Also strongly recommend to move these counters into the code object (that
would
also simplify incrementing/decrementing logic).
We already have array that handles ast_id -> function target there. I sense
that
that array can be turned into generic host for type feedback information
collected by the code.
https://chromiumcodereview.appspot.com/9403009/diff/1/src/ia32/full-codegen-ia32.cc
File src/ia32/full-codegen-ia32.cc (right):
https://chromiumcodereview.appspot.com/9403009/diff/1/src/ia32/full-codegen-ia32.cc#newcode4298
src/ia32/full-codegen-ia32.cc:4298: info_->increment_number_of_ics();
Please wrap increment and __ call together into a helper function called
CallIC() instead of spreading it.
https://chromiumcodereview.appspot.com/9403009/diff/1/src/ic.cc
File src/ic.cc (right):
https://chromiumcodereview.appspot.com/9403009/diff/1/src/ic.cc#newcode335
src/ic.cc:335: if (address > code->instruction_start() &&
I think Code has Contains method.
https://chromiumcodereview.appspot.com/9403009/diff/1/src/ic.cc#newcode337
src/ic.cc:337: shared->set_ic_typeinfo_count(shared->ic_typeinfo_count()
+ 1);
Please add a small comment that this what this code actually does: it
tries to find s.f.i that owns code that contains given IC.
https://chromiumcodereview.appspot.com/9403009/diff/1/src/runtime-profiler.cc
File src/runtime-profiler.cc (right):
https://chromiumcodereview.appspot.com/9403009/diff/1/src/runtime-profiler.cc#newcode114
src/runtime-profiler.cc:114: PrintF(", ICs with typeinfo: %d/%d (%d%%)",
I sense SIGFPE here for code objects without ICs.
https://chromiumcodereview.appspot.com/9403009/diff/1/src/runtime-profiler.cc#newcode265
src/runtime-profiler.cc:265: int ic_typeinfo =
function->shared()->ic_typeinfo_count();
I would rename ic_typeinfo_count into ic_with_typeinfo_count
https://chromiumcodereview.appspot.com/9403009/diff/1/src/runtime-profiler.cc#newcode267
src/runtime-profiler.cc:267: int percentage = 100 * ic_typeinfo /
ic_total;
I sense SIGFPE here for code objects without ICs.
https://chromiumcodereview.appspot.com/9403009/
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev