summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_stats.cpp
blob: 071ae7f66b4cb29ec378506237aa02c85875c09d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/*******************************************************************************
 * Copyright (c) 2009, 2012 IBM Corporation and others. All rights reserved.
 * The contents of this file are made available under the terms
 * of the GNU Lesser General Public License (LGPL) Version 2.1 that
 * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
 * available at http://www.gnu.org/licenses/lgpl.html.  If the version
 * of the LGPL at http://www.gnu.org is different to the version of
 * the LGPL accompanying this distribution and there is any conflict
 * between the two license versions, the terms of the LGPL accompanying
 * this distribution shall govern.
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

#include "swt.h"
#include "webkit_win32_stats.h"

#ifdef NATIVE_STATS

int WebKit_win32_nativeFunctionCount = 60;
int WebKit_win32_nativeFunctionCallCount[60];
char * WebKit_win32_nativeFunctionNames[] = {
	"CFArrayGetCount",
	"CFArrayGetValueAtIndex",
	"CFDataCreate",
	"CFDataGetBytePtr",
	"CFDataGetLength",
	"CFDictionaryCreate",
	"CFHTTPCookieCreateWithResponseHeaderFields",
	"CFHTTPCookieGetFlags",
	"CFHTTPCookieGetName",
	"CFHTTPCookieGetValue",
	"CFHTTPCookieStorageCopyCookies",
	"CFHTTPCookieStorageCopyCookiesForURL",
	"CFHTTPCookieStorageDeleteCookie",
	"CFHTTPCookieStorageSetCookie",
	"CFRelease",
	"CFStringCreateWithCharacters",
	"CFStringGetCharacterAtIndex",
	"CFStringGetCharactersPtr",
	"CFStringGetLength",
	"CFURLCreateWithString",
	"CFURLRequestCopyHTTPRequestBody",
	"CFURLRequestCreateMutableCopy",
	"CFURLRequestSetHTTPRequestBody",
	"CFURLRequestSetURL",
	"JSClassCreate",
	"JSClassDefinition_1sizeof",
	"JSClassRetain",
	"JSContextGetGlobalObject",
	"JSEvaluateScript",
	"JSGlobalContextRetain",
	"JSObjectCallAsFunctionProc_1CALLBACK",
	"JSObjectGetPrivate",
	"JSObjectGetProperty",
	"JSObjectGetPropertyAtIndex",
	"JSObjectGetPropertyProc_1CALLBACK",
	"JSObjectHasPropertyProc_1CALLBACK",
	"JSObjectMake",
	"JSObjectMakeArray",
	"JSObjectMakeFunctionWithCallback",
	"JSObjectSetProperty",
	"JSStringCreateWithUTF8CString",
	"JSStringGetLength",
	"JSStringGetMaximumUTF8CStringSize",
	"JSStringGetUTF8CString",
	"JSStringIsEqualToUTF8CString",
	"JSStringRelease",
	"JSValueGetType",
	"JSValueIsObjectOfClass",
	"JSValueMakeBoolean",
	"JSValueMakeNull",
	"JSValueMakeNumber",
	"JSValueMakeString",
	"JSValueMakeUndefined",
	"JSValueToNumber",
	"JSValueToStringCopy",
	"WebKitCreateInstance",
	"kCFCopyStringDictionaryKeyCallBacks",
	"kCFTypeDictionaryValueCallBacks",
	"memmove",
	"willPerformClientRedirectToURL_1CALLBACK",
};

#define STATS_NATIVE(func) Java_org_eclipse_swt_tools_internal_NativeStats_##func

JNIEXPORT jint JNICALL STATS_NATIVE(WebKit_1win32_1GetFunctionCount)
	(JNIEnv *env, jclass that)
{
	return WebKit_win32_nativeFunctionCount;
}

JNIEXPORT jstring JNICALL STATS_NATIVE(WebKit_1win32_1GetFunctionName)
	(JNIEnv *env, jclass that, jint index)
{
	return env->NewStringUTF(WebKit_win32_nativeFunctionNames[index]);
}

JNIEXPORT jint JNICALL STATS_NATIVE(WebKit_1win32_1GetFunctionCallCount)
	(JNIEnv *env, jclass that, jint index)
{
	return WebKit_win32_nativeFunctionCallCount[index];
}

#endif