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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/v8-counters.cc » ('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 1613 matching lines...) Expand 10 before | Expand all | Expand 10 after
1624 heap->RecordObjectStats(FIXED_ARRAY_TYPE, 1624 heap->RecordObjectStats(FIXED_ARRAY_TYPE,
1625 DESCRIPTOR_ARRAY_SUB_TYPE, 1625 DESCRIPTOR_ARRAY_SUB_TYPE,
1626 fixed_array_size); 1626 fixed_array_size);
1627 } 1627 }
1628 if (map_obj->HasTransitionArray()) { 1628 if (map_obj->HasTransitionArray()) {
1629 int fixed_array_size = map_obj->transitions()->Size(); 1629 int fixed_array_size = map_obj->transitions()->Size();
1630 heap->RecordObjectStats(FIXED_ARRAY_TYPE, 1630 heap->RecordObjectStats(FIXED_ARRAY_TYPE,
1631 TRANSITION_ARRAY_SUB_TYPE, 1631 TRANSITION_ARRAY_SUB_TYPE,
1632 fixed_array_size); 1632 fixed_array_size);
1633 } 1633 }
1634 if (map_obj->code_cache() != heap->empty_fixed_array()) { 1634 Object* code_cache = map_obj->code_cache();
1635 if (!code_cache->IsFixedArray()) {
1636 code_cache = CodeCache::cast(code_cache)->default_cache();
1637 }
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
1638 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
1635 heap->RecordObjectStats( 1639 heap->RecordObjectStats(
1636 FIXED_ARRAY_TYPE, 1640 FIXED_ARRAY_TYPE,
1637 MAP_CODE_CACHE_SUB_TYPE, 1641 MAP_CODE_CACHE_SUB_TYPE,
1638 FixedArray::cast(map_obj->code_cache())->Size()); 1642 FixedArray::cast(code_cache)->Size());
1639 } 1643 }
1640 ObjectStatsVisitBase(kVisitMap, map, obj); 1644 ObjectStatsVisitBase(kVisitMap, map, obj);
1641 } 1645 }
1642 }; 1646 };
1643 1647
1644 1648
1645 template<> 1649 template<>
1646 class MarkCompactMarkingVisitor::ObjectStatsTracker< 1650 class MarkCompactMarkingVisitor::ObjectStatsTracker<
1647 MarkCompactMarkingVisitor::kVisitCode> { 1651 MarkCompactMarkingVisitor::kVisitCode> {
1648 public: 1652 public:
(...skipping 2666 matching lines...) Expand 10 before | Expand all | Expand 10 after
4315 while (buffer != NULL) { 4319 while (buffer != NULL) {
4316 SlotsBuffer* next_buffer = buffer->next(); 4320 SlotsBuffer* next_buffer = buffer->next();
4317 DeallocateBuffer(buffer); 4321 DeallocateBuffer(buffer);
4318 buffer = next_buffer; 4322 buffer = next_buffer;
4319 } 4323 }
4320 *buffer_address = NULL; 4324 *buffer_address = NULL;
4321 } 4325 }
4322 4326
4323 4327
4324 } } // namespace v8::internal 4328 } } // namespace v8::internal
OLDNEW
« 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