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

Unified Diff: skia/ext/event_tracer_impl.cc

Issue 1850603002: [tracing] Use trace event profiling for heap profiling Base URL: https://chromium.googlesource.com/chromium/src.git@all_categories
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
« no previous file with comments | « gin/v8_platform.cc ('k') | third_party/WebKit/Source/platform/EventTracer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/event_tracer_impl.cc
diff --git a/skia/ext/event_tracer_impl.cc b/skia/ext/event_tracer_impl.cc
index be92583eb4e44530fd643c8df8f42f900218d260..ffb1d9927570db871e964e9b9d6b115f01f311d2 100644
--- a/skia/ext/event_tracer_impl.cc
+++ b/skia/ext/event_tracer_impl.cc
@@ -4,6 +4,7 @@
#include <stdint.h>
+#include "base/trace_event/heap_profiler_allocation_context_tracker.h"
#include "base/trace_event/trace_event.h"
#include "skia/ext/event_tracer_impl.h"
#include "third_party/skia/include/utils/SkEventTracer.h"
@@ -25,6 +26,8 @@ class SkChromiumEventTracer: public SkEventTracer {
void updateTraceEventDuration(const uint8_t* categoryEnabledFlag,
const char* name,
SkEventTracer::Handle handle) override;
+ void pushPseudoStackFrame(const char* stack_frame) override;
+ void popPseudoStackFrame(const char* stack_frame) override;
};
const uint8_t*
@@ -32,6 +35,16 @@ const uint8_t*
return TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED(name);
}
+void SkChromiumEventTracer::pushPseudoStackFrame(const char* stack_frame) {
+ base::trace_event::AllocationContextTracker::GetInstanceForCurrentThread()
+ ->PushPseudoStackFrame(stack_frame);
+}
+
+void SkChromiumEventTracer::popPseudoStackFrame(const char* stack_frame) {
+ base::trace_event::AllocationContextTracker::GetInstanceForCurrentThread()
+ ->PopPseudoStackFrame(stack_frame);
+}
+
const char* SkChromiumEventTracer::getCategoryGroupName(
const uint8_t* categoryEnabledFlag) {
return base::trace_event::TraceLog::GetCategoryGroupName(categoryEnabledFlag);
« no previous file with comments | « gin/v8_platform.cc ('k') | third_party/WebKit/Source/platform/EventTracer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698