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

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

Issue 300029: Heap profiler: use Heap::CommittedMemory to report the "total" memory size. (Closed)
Patch Set: Created 11 years, 2 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
« no previous file with comments | « no previous file | no next file » | 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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 SmartPointer<char> s_name( 596 SmartPointer<char> s_name(
597 constructor->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL)); 597 constructor->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL));
598 LOG(HeapSampleJSProducerEvent(GetConstructorName(*s_name), 598 LOG(HeapSampleJSProducerEvent(GetConstructorName(*s_name),
599 reinterpret_cast<Address*>(trace))); 599 reinterpret_cast<Address*>(trace)));
600 } 600 }
601 601
602 602
603 void HeapProfiler::WriteSample() { 603 void HeapProfiler::WriteSample() {
604 LOG(HeapSampleBeginEvent("Heap", "allocated")); 604 LOG(HeapSampleBeginEvent("Heap", "allocated"));
605 LOG(HeapSampleStats( 605 LOG(HeapSampleStats(
606 "Heap", "allocated", Heap::Capacity(), Heap::SizeOfObjects())); 606 "Heap", "allocated", Heap::CommittedMemory(), Heap::SizeOfObjects()));
607 607
608 HistogramInfo info[LAST_TYPE+1]; 608 HistogramInfo info[LAST_TYPE+1];
609 #define DEF_TYPE_NAME(name) info[name].set_name(#name); 609 #define DEF_TYPE_NAME(name) info[name].set_name(#name);
610 INSTANCE_TYPE_LIST(DEF_TYPE_NAME) 610 INSTANCE_TYPE_LIST(DEF_TYPE_NAME)
611 #undef DEF_TYPE_NAME 611 #undef DEF_TYPE_NAME
612 612
613 ConstructorHeapProfile js_cons_profile; 613 ConstructorHeapProfile js_cons_profile;
614 RetainerHeapProfile js_retainer_profile; 614 RetainerHeapProfile js_retainer_profile;
615 HeapIterator iterator; 615 HeapIterator iterator;
616 while (iterator.has_next()) { 616 while (iterator.has_next()) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 GlobalHandles::MakeWeak(handle.location(), 673 GlobalHandles::MakeWeak(handle.location(),
674 static_cast<void*>(stack.start()), 674 static_cast<void*>(stack.start()),
675 StackWeakReferenceCallback); 675 StackWeakReferenceCallback);
676 } 676 }
677 677
678 678
679 #endif // ENABLE_LOGGING_AND_PROFILING 679 #endif // ENABLE_LOGGING_AND_PROFILING
680 680
681 681
682 } } // namespace v8::internal 682 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698