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

Unified Diff: src/mark-compact.cc

Issue 16773002: Add tracing for functions processed by code flushing. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Hannes Payer. Created 7 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index 99c5b4864d3ed94cb37e5a113994bd35e4559acd..b0d925f40a5bbf7d91059dea4d02fb2a4fe7d708 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -1002,6 +1002,10 @@ void CodeFlusher::ProcessJSFunctionCandidates() {
Code* code = shared->code();
MarkBit code_mark = Marking::MarkBitFrom(code);
if (!code_mark.Get()) {
+ if (FLAG_trace_code_flushing && shared->is_compiled()) {
+ SmartArrayPointer<char> name = shared->DebugName()->ToCString();
+ PrintF("[code-flushing clears: %s]\n", *name);
+ }
shared->set_code(lazy_compile);
candidate->set_code(lazy_compile);
} else {
@@ -1039,6 +1043,10 @@ void CodeFlusher::ProcessSharedFunctionInfoCandidates() {
Code* code = candidate->code();
MarkBit code_mark = Marking::MarkBitFrom(code);
if (!code_mark.Get()) {
+ if (FLAG_trace_code_flushing && candidate->is_compiled()) {
+ SmartArrayPointer<char> name = candidate->DebugName()->ToCString();
+ PrintF("[code-flushing clears: %s]\n", *name);
+ }
candidate->set_code(lazy_compile);
}
@@ -1122,6 +1130,11 @@ void CodeFlusher::EvictCandidate(SharedFunctionInfo* shared_info) {
// Make sure previous flushing decisions are revisited.
isolate_->heap()->incremental_marking()->RecordWrites(shared_info);
+ if (FLAG_trace_code_flushing) {
+ SmartArrayPointer<char> name = shared_info->DebugName()->ToCString();
+ PrintF("[code-flushing abandons function-info: %s]\n", *name);
+ }
+
SharedFunctionInfo* candidate = shared_function_info_candidates_head_;
SharedFunctionInfo* next_candidate;
if (candidate == shared_info) {
@@ -1153,6 +1166,11 @@ void CodeFlusher::EvictCandidate(JSFunction* function) {
isolate_->heap()->incremental_marking()->RecordWrites(function);
isolate_->heap()->incremental_marking()->RecordWrites(function->shared());
+ if (FLAG_trace_code_flushing) {
+ SmartArrayPointer<char> name = function->shared()->DebugName()->ToCString();
+ PrintF("[code-flushing abandons closure: %s]\n", *name);
+ }
+
JSFunction* candidate = jsfunction_candidates_head_;
JSFunction* next_candidate;
if (candidate == function) {
@@ -1183,6 +1201,11 @@ void CodeFlusher::EvictOptimizedCodeMap(SharedFunctionInfo* code_map_holder) {
// Make sure previous flushing decisions are revisited.
isolate_->heap()->incremental_marking()->RecordWrites(code_map_holder);
+ if (FLAG_trace_code_flushing) {
+ SmartArrayPointer<char> name = code_map_holder->DebugName()->ToCString();
+ PrintF("[code-flushing abandons code-map: %s]\n", *name);
+ }
+
SharedFunctionInfo* holder = optimized_code_map_holder_head_;
SharedFunctionInfo* next_holder;
if (holder == code_map_holder) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698