java_heap_dump_generator.h 797 B

12345678910111213141516171819202122232425
  1. // Copyright 2019 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef BASE_ANDROID_JAVA_HEAP_DUMP_GENERATOR_H_
  5. #define BASE_ANDROID_JAVA_HEAP_DUMP_GENERATOR_H_
  6. #include <string>
  7. #include "base/android/scoped_java_ref.h"
  8. #include "base/base_export.h"
  9. #include "base/strings/string_piece.h"
  10. namespace base {
  11. namespace android {
  12. // Generates heap dump and writes it to a file at |file_path|. Returns true on
  13. // success. The heap dump is generated through the Android Java system API
  14. // android.os.Debug#dumpHprofData(...)
  15. BASE_EXPORT bool WriteJavaHeapDumpToPath(base::StringPiece file_path);
  16. } // namespace android
  17. } // namespace base
  18. #endif // BASE_ANDROID_JAVA_HEAP_DUMP_GENERATOR_H_