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

Unified Diff: base/android/early_trace_event.h

Issue 874543003: Add support for TraceEvent before the native library is loaded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments, cleanup and a JNI unittest. Created 5 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 | « base/android/base_jni_registrar.cc ('k') | base/android/early_trace_event.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/early_trace_event.h
diff --git a/base/android/early_trace_event.h b/base/android/early_trace_event.h
new file mode 100644
index 0000000000000000000000000000000000000000..c0e375b89436ebbae42c6d2653886e7dd073ec23
--- /dev/null
+++ b/base/android/early_trace_event.h
@@ -0,0 +1,38 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_ANDROID_EARLY_TRACE_EVENT_H_
+#define BASE_ANDROID_EARLY_TRACE_EVENT_H_
+
+#include <jni.h>
+
+#include <string>
+#include <vector>
+
+#include "base/time/time.h"
+
+namespace base {
+namespace android {
+
+bool RegisterEarlyTraceEvent(JNIEnv* env);
+
+// A trace event that was recorded before the native library was initialized.
+struct EarlyTraceEvent {
+ EarlyTraceEvent();
+ ~EarlyTraceEvent();
+
+ std::string name;
+ long thread_id;
+ TimeTicks begin_timestamp;
+ TimeTicks begin_thread_time;
+ TimeTicks end_timestamp;
+ TimeTicks end_thread_time;
+};
+
+void GetAllEarlyTraceEvents(std::vector<EarlyTraceEvent>* trace_events);
+
+} // namespace android
+} // namespace base
+
+#endif // BASE_ANDROID_EARLY_TRACE_EVENT_H_
« no previous file with comments | « base/android/base_jni_registrar.cc ('k') | base/android/early_trace_event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698