From 55c75d799f62e917d9e60215772fff692a106b59 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 25 Mar 2020 15:23:48 -0700 Subject: [PATCH] util: Update the java wrapper names for m5 ops. These were regularized a while ago, but not updated in the java wrapper. There are also missing ops, but these will be added in another change. Change-Id: Iaef281249c26d446709ba2b214ee37d574f6b72c Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27223 Maintainer: Bobby R. Bruce Tested-by: kokoro Reviewed-by: Ciro Santilli --- util/m5/src/jni/gem5Op.java | 16 ++++++++-------- util/m5/src/jni_gem5Op.c | 20 ++++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/util/m5/src/jni/gem5Op.java b/util/m5/src/jni/gem5Op.java index 579ff3455..52c36fff6 100644 --- a/util/m5/src/jni/gem5Op.java +++ b/util/m5/src/jni/gem5Op.java @@ -44,21 +44,21 @@ package jni; public class gem5Op { public native void arm(long address); public native void quiesce(); - public native void quiesceNs(long ns); - public native void quiesceCycle(long cycles); - public native long quiesceTime(); + public native void quiesce_ns(long ns); + public native void quiesce_cycle(long cycles); + public native long quiesce_time(); public native long rpns(); - public native void wakeCPU(long cpuid); + public native void wake_cpu(long cpuid); public native void exit(long ns_delay); public native void fail(long ns_delay, long code); - public native long initparam(long key_str1, long key_str2); + public native long init_param(long key_str1, long key_str2); public native void checkpoint(long ns_delay, long ns_period); public native void reset_stats(long ns_delay, long ns_period); public native void dump_stats(long ns_delay, long ns_period); - public native void dumpreset_stats(long ns_delay, long ns_period); - public native void debugbreak(); - public native void switchcpu(); + public native void dump_reset_stats(long ns_delay, long ns_period); + public native void debug_break(); + public native void switch_cpu(); public native void panic(); public native void work_begin(long workid, long threadid); public native void work_end(long workid, long threadid); diff --git a/util/m5/src/jni_gem5Op.c b/util/m5/src/jni_gem5Op.c index ba61fc08c..6c3f69657 100644 --- a/util/m5/src/jni_gem5Op.c +++ b/util/m5/src/jni_gem5Op.c @@ -57,19 +57,19 @@ Java_jni_gem5Op_quiesce(JNIEnv *env, jobject obj) } JNIEXPORT void JNICALL -Java_jni_gem5Op_quiesceNs(JNIEnv *env, jobject obj, jlong j_ns) +Java_jni_gem5Op_quiesce_1ns(JNIEnv *env, jobject obj, jlong j_ns) { m5_quiesce_ns(j_ns); } JNIEXPORT void JNICALL -Java_jni_gem5Op_quiesceCycle(JNIEnv *env, jobject obj, jlong j_cycles) +Java_jni_gem5Op_quiesce_1cycle(JNIEnv *env, jobject obj, jlong j_cycles) { m5_quiesce_cycle(j_cycles); } JNIEXPORT jlong JNICALL -Java_jni_gem5Op_quiesceTime(JNIEnv *env, jobject obj) +Java_jni_gem5Op_quiesce_1time(JNIEnv *env, jobject obj) { uint64_t time = m5_quiesce_time(); if (time & 0x8000000000000000ULL) @@ -87,7 +87,7 @@ Java_jni_gem5Op_rpns(JNIEnv *env, jobject obj) } JNIEXPORT void JNICALL -Java_jni_gem5Op_wakeCPU(JNIEnv *env, jobject obj, jlong j_cpuid) +Java_jni_gem5Op_wake_1cpu(JNIEnv *env, jobject obj, jlong j_cpuid) { m5_wake_cpu(j_cpuid); } @@ -105,8 +105,8 @@ Java_jni_gem5Op_fail(JNIEnv *env, jobject obj, jlong j_ns_delay, jlong j_code) } JNIEXPORT jlong JNICALL -Java_jni_gem5Op_initparam(JNIEnv *env, jobject obj, jlong j_key_str1, - jlong j_key_str2) +Java_jni_gem5Op_init_1param(JNIEnv *env, jobject obj, jlong j_key_str1, + jlong j_key_str2) { uint64_t param = m5_init_param(j_key_str1, j_key_str2); if (param & 0x8000000000000000ULL) @@ -136,20 +136,20 @@ Java_jni_gem5Op_dump_1stats(JNIEnv *env, jobject obj, } JNIEXPORT void JNICALL -Java_jni_gem5Op_dumpreset_1stats(JNIEnv *env, jobject obj, - jlong j_ns_delay, jlong j_ns_period) +Java_jni_gem5Op_dump_1reset_1stats(JNIEnv *env, jobject obj, + jlong j_ns_delay, jlong j_ns_period) { m5_dump_reset_stats(j_ns_delay, j_ns_period); } JNIEXPORT void JNICALL -Java_jni_gem5Op_debugbreak(JNIEnv *env, jobject obj) +Java_jni_gem5Op_debug_1break(JNIEnv *env, jobject obj) { m5_debug_break(); } JNIEXPORT void JNICALL -Java_jni_gem5Op_switchcpu (JNIEnv *env, jobject obj) +Java_jni_gem5Op_switch_1cpu (JNIEnv *env, jobject obj) { m5_switch_cpu(); } -- 2.30.2