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

Unified Diff: src/mark-compact.cc

Issue 19257002: Fix --track_gc_object_stats option. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Actually add v8-counters.cc... Created 7 years, 5 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 | src/v8-counters.cc » ('j') | 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 c06bfd7f7323825d4c0f278c04e39260eaf3cc4f..c9c40a7528849e7c841b76987e799c0feb2e5272 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -1631,11 +1631,15 @@ class MarkCompactMarkingVisitor::ObjectStatsTracker<
TRANSITION_ARRAY_SUB_TYPE,
fixed_array_size);
}
- if (map_obj->code_cache() != heap->empty_fixed_array()) {
+ Object* code_cache = map_obj->code_cache();
+ if (!code_cache->IsFixedArray()) {
+ code_cache = CodeCache::cast(code_cache)->default_cache();
+ }
danno 2013/07/16 08:02:30 The previous for lines are unneeded (and wrong).
danno 2013/07/16 08:21:50 Sorry, ignore my previous comment. I mis-read the
rmcilroy 2013/07/16 12:05:58 Ahh I see. I was confused because I couldn't alway
+ if (code_cache != heap->empty_descriptor_array()) {
danno 2013/07/16 08:02:30 Just preface the code above with "code_cache->IsFi
danno 2013/07/16 08:21:50 Ignore this comment.
rmcilroy 2013/07/16 12:05:58 Ack
heap->RecordObjectStats(
FIXED_ARRAY_TYPE,
MAP_CODE_CACHE_SUB_TYPE,
- FixedArray::cast(map_obj->code_cache())->Size());
+ FixedArray::cast(code_cache)->Size());
}
ObjectStatsVisitBase(kVisitMap, map, obj);
}
« no previous file with comments | « no previous file | src/v8-counters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698