| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |