xref: /aosp_15_r20/external/cronet/base/android/java_heap_dump_generator.h (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
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_JAVA_HEAP_DUMP_GENERATOR_H_
6 #define BASE_ANDROID_JAVA_HEAP_DUMP_GENERATOR_H_
7 
8 #include <string_view>
9 
10 #include "base/android/scoped_java_ref.h"
11 #include "base/base_export.h"
12 
13 namespace base {
14 namespace android {
15 
16 // Generates heap dump and writes it to a file at |file_path|. Returns true on
17 // success. The heap dump is generated through the Android Java system API
18 // android.os.Debug#dumpHprofData(...)
19 BASE_EXPORT bool WriteJavaHeapDumpToPath(std::string_view file_path);
20 
21 }  // namespace android
22 }  // namespace base
23 
24 #endif  // BASE_ANDROID_JAVA_HEAP_DUMP_GENERATOR_H_
25