X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.eclipse.swt.win32.win32.x86_64%2Flibrary%2Fc_stats.c;fp=bundles%2Forg.eclipse.swt.win32.win32.x86_64%2Flibrary%2Fc_stats.c;h=ed4d3f9b607f90263edb171ad4522cb1d79a32b1;hb=6b98970d0458754dd67f789afbd0a39e1e7ac6eb;hp=0000000000000000000000000000000000000000;hpb=56a61575ce0d27b340cb12438c8a7f303842095e;p=simantics%2Fplatform.git diff --git a/bundles/org.eclipse.swt.win32.win32.x86_64/library/c_stats.c b/bundles/org.eclipse.swt.win32.win32.x86_64/library/c_stats.c new file mode 100644 index 000000000..ed4d3f9b6 --- /dev/null +++ b/bundles/org.eclipse.swt.win32.win32.x86_64/library/c_stats.c @@ -0,0 +1,73 @@ +/******************************************************************************* + * Copyright (c) 2000, 2019 IBM Corporation and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ + +/* Note: This file was auto-generated by org.eclipse.swt.tools.internal.JNIGenerator */ +/* DO NOT EDIT - your changes will be lost. */ + +#include "swt.h" +#include "c_stats.h" + +#ifdef NATIVE_STATS + +char * C_nativeFunctionNames[] = { + "PTR_1sizeof", + "free", + "getenv", + "malloc", + "memmove__JJJ", + "memmove__J_3BJ", + "memmove__J_3CJ", + "memmove__J_3DJ", + "memmove__J_3FJ", + "memmove__J_3IJ", + "memmove__J_3JJ", + "memmove__J_3SJ", + "memmove___3BJJ", + "memmove___3B_3CJ", + "memmove___3CJJ", + "memmove___3DJJ", + "memmove___3FJJ", + "memmove___3IJJ", + "memmove___3I_3BJ", + "memmove___3JJJ", + "memmove___3SJJ", + "memset", + "setenv", + "strlen", +}; +#define NATIVE_FUNCTION_COUNT sizeof(C_nativeFunctionNames) / sizeof(char*) +int C_nativeFunctionCount = NATIVE_FUNCTION_COUNT; +int C_nativeFunctionCallCount[NATIVE_FUNCTION_COUNT]; + +#define STATS_NATIVE(func) Java_org_eclipse_swt_tools_internal_NativeStats_##func + +JNIEXPORT jint JNICALL STATS_NATIVE(C_1GetFunctionCount) + (JNIEnv *env, jclass that) +{ + return C_nativeFunctionCount; +} + +JNIEXPORT jstring JNICALL STATS_NATIVE(C_1GetFunctionName) + (JNIEnv *env, jclass that, jint index) +{ + return (*env)->NewStringUTF(env, C_nativeFunctionNames[index]); +} + +JNIEXPORT jint JNICALL STATS_NATIVE(C_1GetFunctionCallCount) + (JNIEnv *env, jclass that, jint index) +{ + return C_nativeFunctionCallCount[index]; +} + +#endif