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

Side by Side Diff: src/heap.cc

Issue 22379002: Re-reland "Flush parallel recompilation queues on context dispose notification" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed more comments. Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/heap.h ('k') | src/isolate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 incremental_marking()->IsStopped() && 696 incremental_marking()->IsStopped() &&
697 incremental_marking()->WorthActivating() && 697 incremental_marking()->WorthActivating() &&
698 NextGCIsLikelyToBeFull()) { 698 NextGCIsLikelyToBeFull()) {
699 incremental_marking()->Start(); 699 incremental_marking()->Start();
700 } 700 }
701 701
702 return next_gc_likely_to_collect_more; 702 return next_gc_likely_to_collect_more;
703 } 703 }
704 704
705 705
706 int Heap::NotifyContextDisposed() {
707 if (FLAG_parallel_recompilation) {
708 // Flush the queued recompilation tasks.
709 isolate()->optimizing_compiler_thread()->Flush();
710 }
711 flush_monomorphic_ics_ = true;
712 return ++contexts_disposed_;
713 }
714
715
706 void Heap::PerformScavenge() { 716 void Heap::PerformScavenge() {
707 GCTracer tracer(this, NULL, NULL); 717 GCTracer tracer(this, NULL, NULL);
708 if (incremental_marking()->IsStopped()) { 718 if (incremental_marking()->IsStopped()) {
709 PerformGarbageCollection(SCAVENGER, &tracer); 719 PerformGarbageCollection(SCAVENGER, &tracer);
710 } else { 720 } else {
711 PerformGarbageCollection(MARK_COMPACTOR, &tracer); 721 PerformGarbageCollection(MARK_COMPACTOR, &tracer);
712 } 722 }
713 } 723 }
714 724
715 725
(...skipping 7312 matching lines...) Expand 10 before | Expand all | Expand 10 after
8028 if (FLAG_parallel_recompilation) { 8038 if (FLAG_parallel_recompilation) {
8029 heap_->relocation_mutex_->Lock(); 8039 heap_->relocation_mutex_->Lock();
8030 #ifdef DEBUG 8040 #ifdef DEBUG
8031 heap_->relocation_mutex_locked_by_optimizer_thread_ = 8041 heap_->relocation_mutex_locked_by_optimizer_thread_ =
8032 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); 8042 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread();
8033 #endif // DEBUG 8043 #endif // DEBUG
8034 } 8044 }
8035 } 8045 }
8036 8046
8037 } } // namespace v8::internal 8047 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698