Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(796)

Unified Diff: src/compiler.cc

Issue 1997363002: Adds support for collecting statistics about code and its metadata. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments from Ross. Removes the flag code_and_metadata_stats Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/api.cc ('k') | src/heap/heap.h » ('j') | src/heap/spaces.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index d6499509c05549a2c4395168972a692b2a619470..05142af350970f0c68338c6a086945a726baad73 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -445,21 +445,11 @@ bool UseIgnition(CompilationInfo* info) {
}
int CodeAndMetadataSize(CompilationInfo* info) {
- int size = 0;
if (info->has_bytecode_array()) {
- Handle<BytecodeArray> bytecode_array = info->bytecode_array();
- size += bytecode_array->BytecodeArraySize();
- size += bytecode_array->constant_pool()->Size();
- size += bytecode_array->handler_table()->Size();
- size += bytecode_array->source_position_table()->Size();
+ return info->bytecode_array()->SizeIncludingMetadata();
} else {
- Handle<Code> code = info->code();
- size += code->CodeSize();
- size += code->relocation_info()->Size();
- size += code->deoptimization_data()->Size();
- size += code->handler_table()->Size();
+ return info->code()->SizeIncludingMetadata();
Hannes Payer (out of office) 2016/05/25 19:16:20 Drop the else statement.
mythria 2016/05/26 08:51:05 Done.
}
- return size;
}
bool GenerateUnoptimizedCode(CompilationInfo* info) {
« no previous file with comments | « src/api.cc ('k') | src/heap/heap.h » ('j') | src/heap/spaces.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698