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

Unified Diff: src/heap-profiler.cc

Issue 6696042: Adding 'isolates' argument to LOG to get rid of multiple TLS fetches in profiling. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/isolates
Patch Set: Addressing code review feedback + rebase Created 9 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap.cc ('k') | src/ia32/assembler-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap-profiler.cc
diff --git a/src/heap-profiler.cc b/src/heap-profiler.cc
index ec3373433d4c668292a6adea9dbb88848191c78a..c78f474472a5fde56f7bf3206a7d68caba079eba 100644
--- a/src/heap-profiler.cc
+++ b/src/heap-profiler.cc
@@ -174,7 +174,8 @@ class RetainersPrinter : public RetainerHeapProfile::Printer {
HeapStringAllocator allocator;
StringStream stream(&allocator);
cluster.Print(&stream);
- LOG(HeapSampleJSRetainersEvent(
+ LOG(ISOLATE,
+ HeapSampleJSRetainersEvent(
*(stream.ToCString()), *(retainers.ToCString())));
}
};
@@ -468,7 +469,8 @@ void ConstructorHeapProfile::Call(const JSObjectsCluster& cluster,
HeapStringAllocator allocator;
StringStream stream(&allocator);
cluster.Print(&stream);
- LOG(HeapSampleJSConstructorEvent(*(stream.ToCString()),
+ LOG(ISOLATE,
+ HeapSampleJSConstructorEvent(*(stream.ToCString()),
number_and_size.number(),
number_and_size.bytes()));
}
@@ -757,16 +759,18 @@ static void PrintProducerStackTrace(Object* obj, void* trace) {
String* constructor = GetConstructorNameForHeapProfile(JSObject::cast(obj));
SmartPointer<char> s_name(
constructor->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL));
- LOG(HeapSampleJSProducerEvent(GetConstructorName(*s_name),
+ LOG(ISOLATE,
+ HeapSampleJSProducerEvent(GetConstructorName(*s_name),
reinterpret_cast<Address*>(trace)));
}
void HeapProfiler::WriteSample() {
Isolate* isolate = Isolate::Current();
- LOG(HeapSampleBeginEvent("Heap", "allocated"));
- LOG(HeapSampleStats(
- "Heap", "allocated", HEAP->CommittedMemory(), HEAP->SizeOfObjects()));
+ LOG(isolate, HeapSampleBeginEvent("Heap", "allocated"));
+ LOG(isolate,
+ HeapSampleStats(
+ "Heap", "allocated", HEAP->CommittedMemory(), HEAP->SizeOfObjects()));
AggregatedHeapSnapshot snapshot;
AggregatedHeapSnapshotGenerator generator(&snapshot);
@@ -777,7 +781,8 @@ void HeapProfiler::WriteSample() {
i <= AggregatedHeapSnapshotGenerator::kAllStringsType;
++i) {
if (info[i].bytes() > 0) {
- LOG(HeapSampleItemEvent(info[i].name(), info[i].number(),
+ LOG(isolate,
+ HeapSampleItemEvent(info[i].name(), info[i].number(),
info[i].bytes()));
}
}
@@ -788,7 +793,7 @@ void HeapProfiler::WriteSample() {
isolate->global_handles()->IterateWeakRoots(PrintProducerStackTrace,
StackWeakReferenceCallback);
- LOG(HeapSampleEndEvent("Heap", "allocated"));
+ LOG(isolate, HeapSampleEndEvent("Heap", "allocated"));
}
« no previous file with comments | « src/heap.cc ('k') | src/ia32/assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698