Skip to content

Commit af2167a

Browse files
committed
[GR-28783] Implement environment for JVMTI in Espresso.
PullRequest: graal/8301
2 parents e95d24c + bd06e9f commit af2167a

40 files changed

+6995
-1475
lines changed

espresso/src/com.oracle.truffle.espresso.mokapot/include/jvmti.h

Lines changed: 2625 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Copyright (c) 2020, 2020, Oracle and/or its affiliates. All rights reserved.
3+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
*
5+
* This code is free software; you can redistribute it and/or modify it
6+
* under the terms of the GNU General Public License version 2 only, as
7+
* published by the Free Software Foundation.
8+
*
9+
* This code is distributed in the hope that it will be useful, but WITHOUT
10+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12+
* version 2 for more details (a copy is included in the LICENSE file that
13+
* accompanied this code).
14+
*
15+
* You should have received a copy of the GNU General Public License version
16+
* 2 along with this work; if not, write to the Free Software Foundation,
17+
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18+
*
19+
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20+
* or visit www.oracle.com if you need additional information or have any
21+
* questions.
22+
*/
23+
#ifndef _JVMTI_ENV_H
24+
#define _JVMTI_ENV_H
25+
26+
#include <trufflenfi.h>
27+
#include <jni.h>
28+
29+
#include <stddef.h>
30+
31+
JNIEXPORT jvmtiEnv* JNICALL initializeJvmtiContext(void* (*fetch_by_name)(const char *), const int version);
32+
33+
JNIEXPORT void JNICALL disposeJvmtiContext(jvmtiEnv *env, int version, void (*release_closure)(void *));
34+
35+
JNIEXPORT void JNICALL initializeJvmtiHandlerContext(void (*notify_member_offset_init)(void *));
36+
37+
JNIEXPORT size_t JNICALL lookupMemberOffset(void* info, char* id);
38+
39+
#endif // _JVMTI_ENV_H

espresso/src/com.oracle.truffle.espresso.mokapot/mapfile-vers

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ SUNWprivate_1.1 {
3737
# Espresso management native API
3838
initializeManagementContext;
3939
disposeManagementContext;
40+
41+
# Espresso jvmti native API
42+
initializeJvmtiContext;
43+
disposeJvmtiContext;
44+
initializeJvmtiHandlerContext;
45+
lookupMemberOffset;
4046

4147
# JNI
4248
JNI_CreateJavaVM;

0 commit comments

Comments
 (0)