Move to kernel style SPDX license identifiers
[lttng-ust.git] / liblttng-ust-java / LTTngUst.c
index 0bef89ddb5252f2be069b8129081414bd6b7de84..64b42f3b22a22f5585c2fb8ae4504ca20340caee 100644 (file)
@@ -1,22 +1,11 @@
 /*
- * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; only
- * version 2.1 of the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * SPDX-License-Identifier: LGPL-2.1-only
  *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
-#include <jni.h>
+#define _LGPL_SOURCE
+#include "org_lttng_ust_LTTngUst.h"
 
 #define TRACEPOINT_DEFINE
 #define TRACEPOINT_CREATE_PROBES
@@ -35,6 +24,20 @@ JNIEXPORT void JNICALL Java_org_lttng_ust_LTTngUst_tracepointInt(JNIEnv *env,
        (*env)->ReleaseStringUTFChars(env, ev_name, ev_name_cstr);
 }
 
+JNIEXPORT void JNICALL Java_org_lttng_ust_LTTngUst_tracepointIntInt(JNIEnv *env,
+                                               jobject jobj,
+                                               jstring ev_name,
+                                               jint payload1,
+                                               jint payload2)
+{
+       jboolean iscopy;
+       const char *ev_name_cstr = (*env)->GetStringUTFChars(env, ev_name, &iscopy);
+
+       tracepoint(lttng_ust_java, int_int_event, ev_name_cstr, payload1, payload2);
+
+       (*env)->ReleaseStringUTFChars(env, ev_name, ev_name_cstr);
+}
+
 JNIEXPORT void JNICALL Java_org_lttng_ust_LTTngUst_tracepointLong(JNIEnv *env,
                                                jobject jobj,
                                                jstring ev_name,
@@ -48,6 +51,20 @@ JNIEXPORT void JNICALL Java_org_lttng_ust_LTTngUst_tracepointLong(JNIEnv *env,
        (*env)->ReleaseStringUTFChars(env, ev_name, ev_name_cstr);
 }
 
+JNIEXPORT void JNICALL Java_org_lttng_ust_LTTngUst_tracepointLongLong(JNIEnv *env,
+                                               jobject jobj,
+                                               jstring ev_name,
+                                               jlong payload1,
+                                               jlong payload2)
+{
+       jboolean iscopy;
+       const char *ev_name_cstr = (*env)->GetStringUTFChars(env, ev_name, &iscopy);
+
+       tracepoint(lttng_ust_java, long_long_event, ev_name_cstr, payload1, payload2);
+
+       (*env)->ReleaseStringUTFChars(env, ev_name, ev_name_cstr);
+}
+
 JNIEXPORT void JNICALL Java_org_lttng_ust_LTTngUst_tracepointString(JNIEnv *env,
                                                jobject jobj,
                                                jstring ev_name,
This page took 0.024478 seconds and 4 git commands to generate.