Revision: 9332
Author: [email protected]
Date: Tue Sep 20 01:32:48 2011
Log: Speed up finding code objects from addresses in asserts. With
the new large pages it takes too long to iterate from the start
of the page to find a code object.
Review URL: http://codereview.chromium.org/7974007
http://code.google.com/p/v8/source/detail?r=9332
Modified:
/branches/bleeding_edge/src/heap.cc
=======================================
--- /branches/bleeding_edge/src/heap.cc Mon Sep 19 11:36:47 2011
+++ /branches/bleeding_edge/src/heap.cc Tue Sep 20 01:32:48 2011
@@ -844,13 +844,7 @@
Object* Heap::FindCodeObject(Address a) {
- Object* obj = NULL; // Initialization to please compiler.
- { MaybeObject* maybe_obj = code_space_->FindObject(a);
- if (!maybe_obj->ToObject(&obj)) {
- obj = lo_space_->FindObject(a)->ToObjectUnchecked();
- }
- }
- return obj;
+ return isolate()->pc_to_code_cache()->GcSafeFindCodeForPc(a);
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev