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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 const JSObjectsCluster ClustersCoarser::ClusterEqualityConfig::kNoValue; | 529 const JSObjectsCluster ClustersCoarser::ClusterEqualityConfig::kNoValue; |
530 const JSObjectsRetainerTreeConfig::Key JSObjectsRetainerTreeConfig::kNoKey; | 530 const JSObjectsRetainerTreeConfig::Key JSObjectsRetainerTreeConfig::kNoKey; |
531 const JSObjectsRetainerTreeConfig::Value JSObjectsRetainerTreeConfig::kNoValue = | 531 const JSObjectsRetainerTreeConfig::Value JSObjectsRetainerTreeConfig::kNoValue = |
532 NULL; | 532 NULL; |
533 | 533 |
534 | 534 |
535 RetainerHeapProfile::RetainerHeapProfile() | 535 RetainerHeapProfile::RetainerHeapProfile() |
536 : zscope_(DELETE_ON_EXIT) { | 536 : zscope_(DELETE_ON_EXIT) { |
537 JSObjectsCluster roots(JSObjectsCluster::ROOTS); | 537 JSObjectsCluster roots(JSObjectsCluster::ROOTS); |
538 ReferencesExtractor extractor(roots, this); | 538 ReferencesExtractor extractor(roots, this); |
539 Heap::IterateRoots(&extractor); | 539 Heap::IterateRoots(&extractor, VISIT_ONLY_STRONG); |
540 } | 540 } |
541 | 541 |
542 | 542 |
543 void RetainerHeapProfile::StoreReference(const JSObjectsCluster& cluster, | 543 void RetainerHeapProfile::StoreReference(const JSObjectsCluster& cluster, |
544 HeapObject* ref) { | 544 HeapObject* ref) { |
545 JSObjectsCluster ref_cluster = Clusterizer::Clusterize(ref); | 545 JSObjectsCluster ref_cluster = Clusterizer::Clusterize(ref); |
546 if (ref_cluster.is_null()) return; | 546 if (ref_cluster.is_null()) return; |
547 JSObjectsRetainerTree::Locator ref_loc; | 547 JSObjectsRetainerTree::Locator ref_loc; |
548 if (retainers_tree_.Insert(ref_cluster, &ref_loc)) { | 548 if (retainers_tree_.Insert(ref_cluster, &ref_loc)) { |
549 ref_loc.set_value(new JSObjectsClusterTree()); | 549 ref_loc.set_value(new JSObjectsClusterTree()); |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 GlobalHandles::MakeWeak(handle.location(), | 685 GlobalHandles::MakeWeak(handle.location(), |
686 static_cast<void*>(stack.start()), | 686 static_cast<void*>(stack.start()), |
687 StackWeakReferenceCallback); | 687 StackWeakReferenceCallback); |
688 } | 688 } |
689 | 689 |
690 | 690 |
691 #endif // ENABLE_LOGGING_AND_PROFILING | 691 #endif // ENABLE_LOGGING_AND_PROFILING |
692 | 692 |
693 | 693 |
694 } } // namespace v8::internal | 694 } } // namespace v8::internal |
OLD | NEW |