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 package org.chromium.base.test; 6 7 import org.jni_zero.JNINamespace; 8 import org.jni_zero.NativeMethods; 9 10 /** Class containing only static methods for querying the status of the reached code profiler. */ 11 @JNINamespace("base::android") 12 public class ReachedCodeProfiler { ReachedCodeProfiler()13 private ReachedCodeProfiler() {} 14 15 /** 16 * @return Whether the reached code profiler is enabled. 17 */ isEnabled()18 public static boolean isEnabled() { 19 return ReachedCodeProfilerJni.get().isReachedCodeProfilerEnabled(); 20 } 21 22 /** 23 * @return Whether the currently used version of native library supports the reached code 24 * profiler. 25 */ isSupported()26 public static boolean isSupported() { 27 return ReachedCodeProfilerJni.get().isReachedCodeProfilerSupported(); 28 } 29 30 @NativeMethods 31 interface Natives { isReachedCodeProfilerEnabled()32 boolean isReachedCodeProfilerEnabled(); 33 isReachedCodeProfilerSupported()34 boolean isReachedCodeProfilerSupported(); 35 } 36 } 37