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

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: Address comments. Created 5 years, 10 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/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..2c205608a94df11e608c541298eb37438a9ff419
--- /dev/null
+++ b/base/android/early_trace_event.h
@@ -0,0 +1,38 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
dsinclair 2015/02/09 21:11:20 nit: 2015 (and other new files)
Benoit L 2015/02/10 15:31:35 Done.
+// 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_

Powered by Google App Engine
This is Rietveld 408576698