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

Unified Diff: base/trace_event/heap_profiler_allocation_context_tracker.cc

Issue 1846333002: Revert of [tracing] Adding task information to heap profiler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: base/trace_event/heap_profiler_allocation_context_tracker.cc
diff --git a/base/trace_event/heap_profiler_allocation_context_tracker.cc b/base/trace_event/heap_profiler_allocation_context_tracker.cc
index 518792c4a5034b448eb364d13c3b223da147a4dd..0aa54a84ed380f8ee7e8f669bd78532041943e14 100644
--- a/base/trace_event/heap_profiler_allocation_context_tracker.cc
+++ b/base/trace_event/heap_profiler_allocation_context_tracker.cc
@@ -19,7 +19,6 @@
namespace {
const size_t kMaxStackDepth = 128u;
-const size_t kMaxTaskDepth = 16u;
AllocationContextTracker* const kInitializingSentinel =
reinterpret_cast<AllocationContextTracker*>(-1);
@@ -52,7 +51,6 @@
AllocationContextTracker::AllocationContextTracker() : thread_name_(nullptr) {
pseudo_stack_.reserve(kMaxStackDepth);
- task_contexts_.reserve(kMaxTaskDepth);
}
AllocationContextTracker::~AllocationContextTracker() {}
@@ -101,20 +99,6 @@
pseudo_stack_.pop_back();
}
-void AllocationContextTracker::PushCurrentTaskContext(const char* context) {
- DCHECK(context);
- if (task_contexts_.size() < kMaxTaskDepth)
- task_contexts_.push_back(context);
- else
- NOTREACHED();
-}
-
-void AllocationContextTracker::PopCurrentTaskContext(const char* context) {
- DCHECK_EQ(context, task_contexts_.back())
- << "Encountered an unmatched context end";
- task_contexts_.pop_back();
-}
-
// static
AllocationContext AllocationContextTracker::GetContextSnapshot() {
AllocationContext ctx;
@@ -141,9 +125,7 @@
std::fill(dst, dst_end, nullptr);
}
- // TODO(ssid): Fix crbug.com/594803 to add file name as 3rd dimension
- // (component name) in the heap profiler and not piggy back on the type name.
- ctx.type_name = task_contexts_.empty() ? nullptr : task_contexts_.back();
+ ctx.type_name = nullptr;
return ctx;
}

Powered by Google App Engine
This is Rietveld 408576698