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.
5 #include "base/android/java_heap_dump_generator.h"
9 #include "base/android/jni_string.h"
10 #include "base/base_jni/JavaHeapDumpGenerator_jni.h"
15 bool WriteJavaHeapDumpToPath(base::StringPiece filePath) {
16 JNIEnv* env = AttachCurrentThread();
17 return Java_JavaHeapDumpGenerator_generateHprof(
18 env, base::android::ConvertUTF8ToJavaString(env, filePath));
21 } // namespace android