diff options
Diffstat (limited to 'chromium/base/android/java_heap_dump_generator.h')
-rw-r--r-- | chromium/base/android/java_heap_dump_generator.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/chromium/base/android/java_heap_dump_generator.h b/chromium/base/android/java_heap_dump_generator.h new file mode 100644 index 00000000000..18aaa802aed --- /dev/null +++ b/chromium/base/android/java_heap_dump_generator.h @@ -0,0 +1,23 @@ +// Copyright 2019 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef BASE_ANDROID_JAVA_HEAP_DUMP_GENERATOR_H_ +#define BASE_ANDROID_JAVA_HEAP_DUMP_GENERATOR_H_ + +#include "base/android/scoped_java_ref.h" +#include "base/base_export.h" +#include "base/strings/string_piece.h" + +namespace base { +namespace android { + +// Generates heap dump and writes it to a file at |file_path|. Returns true on +// success. The heap dump is generated through the Android Java system API +// android.os.Debug#dumpHprofData(...) +BASE_EXPORT bool WriteJavaHeapDumpToPath(base::StringPiece file_path); + +} // namespace android +} // namespace base + +#endif // BASE_ANDROID_JAVA_HEAP_DUMP_GENERATOR_H_ |