Home | History | Annotate | Download | only in native

Lines Matching refs:Env

45 static jobjectArray VMDebug_getVmFeatureList(JNIEnv* env, jclass) {
53 jobjectArray result = env->NewObjectArray(arraysize(features),
58 ScopedLocalRef<jstring> jfeature(env, env->NewStringUTF(features[i]));
62 env->SetObjectArrayElement(result, i, jfeature.get());
91 static void VMDebug_startMethodTracingFd(JNIEnv* env, jclass, jstring javaTraceFilename,
94 int originalFd = jniGetFDFromFileDescriptor(env, javaFd);
101 ScopedObjectAccess soa(env);
107 ScopedUtfChars traceFilename(env, javaTraceFilename);
116 static void VMDebug_startMethodTracingFilename(JNIEnv* env, jclass, jstring javaTraceFilename,
119 ScopedUtfChars traceFilename(env, javaTraceFilename);
158 static void ThrowUnsupportedOperationException(JNIEnv* env) {
159 ScopedObjectAccess soa(env);
163 static void VMDebug_startInstructionCounting(JNIEnv* env, jclass) {
164 ThrowUnsupportedOperationException(env);
167 static void VMDebug_stopInstructionCounting(JNIEnv* env, jclass) {
168 ThrowUnsupportedOperationException(env);
171 static void VMDebug_getInstructionCount(JNIEnv* env, jclass, jintArray /*javaCounts*/) {
172 ThrowUnsupportedOperationException(env);
175 static void VMDebug_resetInstructionCount(JNIEnv* env, jclass) {
176 ThrowUnsupportedOperationException(env);
179 static void VMDebug_printLoadedClasses(JNIEnv* env, jclass, jint flags) {
180 ScopedFastNativeObjectAccess soa(env);
184 static jint VMDebug_getLoadedClassCount(JNIEnv* env, jclass) {
185 ScopedFastNativeObjectAccess soa(env);
203 static void VMDebug_dumpHprofData(JNIEnv* env, jclass, jstring javaFilename, jobject javaFd) {
206 ScopedObjectAccess soa(env);
213 ScopedUtfChars chars(env, javaFilename);
214 if (env->ExceptionCheck()) {
224 fd = jniGetFDFromFileDescriptor(env, javaFd);
226 ScopedObjectAccess soa(env);
239 static void VMDebug_dumpReferenceTables(JNIEnv* env, jclass) {
240 ScopedObjectAccess soa(env);
243 soa.Env()->DumpReferenceTables(LOG(INFO));
257 static jlong VMDebug_countInstancesOfClass(JNIEnv* env, jclass, jclass javaClass,
259 ScopedObjectAccess soa(env);
272 static jlongArray VMDebug_countInstancesOfClasses(JNIEnv* env, jclass, jobjectArray javaClasses,
274 ScopedObjectAccess soa(env);
304 static void VMDebug_getHeapSpaceStats(JNIEnv* env, jclass, jlongArray data) {
305 jlong* arr = reinterpret_cast<jlong*>(env->GetPrimitiveArrayCritical(data, 0));
306 if (arr == nullptr || env->GetArrayLength(data) < 9) {
318 ScopedObjectAccess soa(env);
358 env->ReleasePrimitiveArrayCritical(data, arr, 0);
374 static jobject VMDebug_getRuntimeStatInternal(JNIEnv* env, jclass, jint statId) {
379 return env->NewStringUTF(output.c_str());
383 return env->NewStringUTF(output.c_str());
387 return env->NewStringUTF(output.c_str());
391 return env->NewStringUTF(output.c_str());
395 return env->NewStringUTF(output.c_str());
399 return env->NewStringUTF(output.c_str());
404 return env->NewStringUTF(output.str().c_str());
409 return env->NewStringUTF(output.str().c_str());
416 static bool SetRuntimeStatValue(JNIEnv* env, jobjectArray result, VMDebugRuntimeStatId id,
418 ScopedLocalRef<jstring> jvalue(env, env->NewStringUTF(value.c_str()));
422 env->SetObjectArrayElement(result, static_cast<jint>(id), jvalue.get());
426 static jobjectArray VMDebug_getRuntimeStatsInternal(JNIEnv* env, jclass) {
427 jobjectArray result = env->NewObjectArray(
435 if (!SetRuntimeStatValue(env, result, VMDebugRuntimeStatId::kArtGcGcCount,
439 if (!SetRuntimeStatValue(env, result, VMDebugRuntimeStatId::kArtGcGcTime,
443 if (!SetRuntimeStatValue(env, result, VMDebugRuntimeStatId::kArtGcBytesAllocated,
447 if (!SetRuntimeStatValue(env, result, VMDebugRuntimeStatId::kArtGcBytesFreed,
451 if (!SetRuntimeStatValue(env, result, VMDebugRuntimeStatId::kArtGcBlockingGcCount,
455 if (!SetRuntimeStatValue(env, result, VMDebugRuntimeStatId::kArtGcBlockingGcTime,
462 if (!SetRuntimeStatValue(env, result, VMDebugRuntimeStatId::kArtGcGcCountRateHistogram,
470 if (!SetRuntimeStatValue(env, result, VMDebugRuntimeStatId::kArtGcBlockingGcCountRateHistogram,
513 void register_dalvik_system_VMDebug(JNIEnv* env) {