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

Unified Diff: src/heap-profiler.cc

Issue 148593004: A64: Synchronize with r18084. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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/heap-profiler.h ('k') | src/heap-snapshot-generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap-profiler.cc
diff --git a/src/heap-profiler.cc b/src/heap-profiler.cc
index b45e97b690fc3fd30b922f4603229074c17bc65d..a4ec5a979f02ba0159f2f05e83b38dbcb942c0f8 100644
--- a/src/heap-profiler.cc
+++ b/src/heap-profiler.cc
@@ -27,7 +27,6 @@
#include "v8.h"
-#include "deoptimizer.h"
#include "heap-profiler.h"
#include "heap-snapshot-generator-inl.h"
@@ -160,7 +159,6 @@ void HeapProfiler::StartHeapAllocationsRecording() {
StartHeapObjectsTracking();
heap()->DisableInlineAllocation();
is_tracking_allocations_ = true;
- DropCompiledCode();
snapshots_->UpdateHeapObjectsMap();
}
@@ -169,45 +167,6 @@ void HeapProfiler::StopHeapAllocationsRecording() {
StopHeapObjectsTracking();
heap()->EnableInlineAllocation();
is_tracking_allocations_ = false;
- DropCompiledCode();
-}
-
-
-void HeapProfiler::DropCompiledCode() {
- Isolate* isolate = heap()->isolate();
- HandleScope scope(isolate);
-
- if (isolate->concurrent_recompilation_enabled()) {
- isolate->optimizing_compiler_thread()->Flush();
- }
-
- Deoptimizer::DeoptimizeAll(isolate);
-
- Handle<Code> lazy_compile =
- Handle<Code>(isolate->builtins()->builtin(Builtins::kLazyCompile));
-
- heap()->CollectAllGarbage(Heap::kMakeHeapIterableMask,
- "switch allocations tracking");
-
- DisallowHeapAllocation no_allocation;
-
- HeapIterator iterator(heap());
- HeapObject* obj = NULL;
- while (((obj = iterator.next()) != NULL)) {
- if (obj->IsJSFunction()) {
- JSFunction* function = JSFunction::cast(obj);
- SharedFunctionInfo* shared = function->shared();
-
- if (!shared->allows_lazy_compilation()) continue;
- if (!shared->script()->IsScript()) continue;
-
- Code::Kind kind = function->code()->kind();
- if (kind == Code::FUNCTION || kind == Code::BUILTIN) {
- function->set_code(*lazy_compile);
- shared->set_code(*lazy_compile);
- }
- }
- }
}
« no previous file with comments | « src/heap-profiler.h ('k') | src/heap-snapshot-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698