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

Side by Side Diff: src/heap-profiler.cc

Issue 555072: Merge ObjectIterator::has_next and ObjectIterator::next methods.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/heap.cc ('k') | src/log.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 "Heap", "allocated", Heap::CommittedMemory(), Heap::SizeOfObjects())); 618 "Heap", "allocated", Heap::CommittedMemory(), Heap::SizeOfObjects()));
619 619
620 HistogramInfo info[LAST_TYPE+1]; 620 HistogramInfo info[LAST_TYPE+1];
621 #define DEF_TYPE_NAME(name) info[name].set_name(#name); 621 #define DEF_TYPE_NAME(name) info[name].set_name(#name);
622 INSTANCE_TYPE_LIST(DEF_TYPE_NAME) 622 INSTANCE_TYPE_LIST(DEF_TYPE_NAME)
623 #undef DEF_TYPE_NAME 623 #undef DEF_TYPE_NAME
624 624
625 ConstructorHeapProfile js_cons_profile; 625 ConstructorHeapProfile js_cons_profile;
626 RetainerHeapProfile js_retainer_profile; 626 RetainerHeapProfile js_retainer_profile;
627 HeapIterator iterator; 627 HeapIterator iterator;
628 while (iterator.has_next()) { 628 for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) {
629 HeapObject* obj = iterator.next();
630 CollectStats(obj, info); 629 CollectStats(obj, info);
631 js_cons_profile.CollectStats(obj); 630 js_cons_profile.CollectStats(obj);
632 js_retainer_profile.CollectStats(obj); 631 js_retainer_profile.CollectStats(obj);
633 } 632 }
634 633
635 // Lump all the string types together. 634 // Lump all the string types together.
636 int string_number = 0; 635 int string_number = 0;
637 int string_bytes = 0; 636 int string_bytes = 0;
638 #define INCREMENT_SIZE(type, size, name, camel_name) \ 637 #define INCREMENT_SIZE(type, size, name, camel_name) \
639 string_number += info[type].number(); \ 638 string_number += info[type].number(); \
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 GlobalHandles::MakeWeak(handle.location(), 685 GlobalHandles::MakeWeak(handle.location(),
687 static_cast<void*>(stack.start()), 686 static_cast<void*>(stack.start()),
688 StackWeakReferenceCallback); 687 StackWeakReferenceCallback);
689 } 688 }
690 689
691 690
692 #endif // ENABLE_LOGGING_AND_PROFILING 691 #endif // ENABLE_LOGGING_AND_PROFILING
693 692
694 693
695 } } // namespace v8::internal 694 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698