• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2019 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef BASE_ANDROID_REACHED_CODE_PROFILER_H_
6 #define BASE_ANDROID_REACHED_CODE_PROFILER_H_
7 
8 #include "base/android/library_loader/library_loader_hooks.h"
9 #include "base/base_export.h"
10 
11 namespace base {
12 namespace android {
13 
14 // Initializes and starts the reached code profiler for |library_process_type|.
15 // Reached symbols are not recorded before calling this function, so it has to
16 // be called as early in startup as possible. This has to be called before the
17 // process creates any thread.
18 // TODO(crbug.com/916263): Currently, the reached code profiler must be
19 // initialized before the tracing profiler. If we want to start it at later
20 // point, we need to check that the tracing profiler isn't initialized first.
21 BASE_EXPORT void InitReachedCodeProfilerAtStartup(
22     LibraryProcessType library_process_type);
23 
24 // Returns whether the reached code profiler is enabled.
25 BASE_EXPORT bool IsReachedCodeProfilerEnabled();
26 
27 // Returns whether the reached code profiler can be possibly enabled for the
28 // current build configuration.
29 BASE_EXPORT bool IsReachedCodeProfilerSupported();
30 
31 }  // namespace android
32 }  // namespace base
33 
34 #endif  // BASE_ANDROID_REACHED_CODE_PROFILER_H_
35