Commit 10fdd650 authored by erik.corry@gmail.com's avatar erik.corry@gmail.com

Add counters for the different code generators.

Review URL: http://codereview.chromium.org/552184

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3714 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 90045ddd
......@@ -217,6 +217,10 @@ Handle<Code> CodeGenerator::MakeCodeEpilogue(FunctionLiteral* fun,
Handle<Code> CodeGenerator::MakeCode(FunctionLiteral* fun,
Handle<Script> script,
bool is_eval) {
if (!script->IsUndefined() && !script->source()->IsUndefined()) {
int len = String::cast(script->source())->length();
Counters::total_old_codegen_source_size.Increment(len);
}
MakeCodePrologue(fun);
// Generate code.
const int kInitialBufferSize = 4 * KB;
......
......@@ -488,6 +488,10 @@ void FullCodeGenSyntaxChecker::VisitThisFunction(ThisFunction* expr) {
Handle<Code> FullCodeGenerator::MakeCode(FunctionLiteral* fun,
Handle<Script> script,
bool is_eval) {
if (!script->IsUndefined() && !script->source()->IsUndefined()) {
int len = String::cast(script->source())->length();
Counters::total_full_codegen_source_size.Increment(len);
}
CodeGenerator::MakeCodePrologue(fun);
const int kInitialBufferSize = 4 * KB;
MacroAssembler masm(NULL, kInitialBufferSize);
......
......@@ -93,7 +93,11 @@ namespace internal {
/* Amount of source code skipped over using preparsing. */ \
SC(total_preparse_skipped, V8.TotalPreparseSkipped) \
/* Amount of compiled source code. */ \
SC(total_compile_size, V8.TotalCompileSize)
SC(total_compile_size, V8.TotalCompileSize) \
/* Amount of source code compiled with the old codegen. */ \
SC(total_old_codegen_source_size, V8.TotalOldCodegenSourceSize) \
/* Amount of source code compiled with the full codegen. */ \
SC(total_full_codegen_source_size, V8.TotalFullCodegenSourceSize)
#define STATS_COUNTER_LIST_2(SC) \
......
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