author | mbaesken |
Fri, 13 Sep 2019 11:04:46 +0200 | |
changeset 58173 | 6a30ad1cfeec |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
4808
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
1 |
/* |
5506 | 2 |
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. |
4808
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
4 |
* |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
4808
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
4808
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
10 |
* |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
15 |
* accompanied this code). |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
16 |
* |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
17 |
* You should have received a copy of the GNU General Public License version |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
20 |
* |
5506 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
4808
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
24 |
*/ |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
25 |
|
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
26 |
/* |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
27 |
* This header file defines the data structures sent by the VM |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
28 |
* through the JVMTI CompiledMethodLoad callback function via the |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
29 |
* "void * compile_info" parameter. The memory pointed to by the |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
30 |
* compile_info parameter may not be referenced after returning from |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
31 |
* the CompiledMethodLoad callback. These are VM implementation |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
32 |
* specific data structures that may evolve in future releases. A |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
33 |
* JVMTI agent should interpret a non-NULL compile_info as a pointer |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
34 |
* to a region of memory containing a list of records. In a typical |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
35 |
* usage scenario, a JVMTI agent would cast each record to a |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
36 |
* jvmtiCompiledMethodLoadRecordHeader, a struct that represents |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
37 |
* arbitrary information. This struct contains a kind field to indicate |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
38 |
* the kind of information being passed, and a pointer to the next |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
39 |
* record. If the kind field indicates inlining information, then the |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
40 |
* agent would cast the record to a jvmtiCompiledMethodLoadInlineRecord. |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
41 |
* This record contains an array of PCStackInfo structs, which indicate |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
42 |
* for every pc address what are the methods on the invocation stack. |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
43 |
* The "methods" and "bcis" fields in each PCStackInfo struct specify a |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
44 |
* 1-1 mapping between these inlined methods and their bytecode indices. |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
45 |
* This can be used to derive the proper source lines of the inlined |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
46 |
* methods. |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
47 |
*/ |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
48 |
|
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
49 |
#ifndef _JVMTI_CMLR_H_ |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
50 |
#define _JVMTI_CMLR_H_ |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
51 |
|
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
52 |
enum { |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
53 |
JVMTI_CMLR_MAJOR_VERSION_1 = 0x00000001, |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
54 |
JVMTI_CMLR_MINOR_VERSION_0 = 0x00000000, |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
55 |
|
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
56 |
JVMTI_CMLR_MAJOR_VERSION = 0x00000001, |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
57 |
JVMTI_CMLR_MINOR_VERSION = 0x00000000 |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
58 |
|
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
59 |
/* |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
60 |
* This comment is for the "JDK import from HotSpot" sanity check: |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
61 |
* version: 1.0.0 |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
62 |
*/ |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
63 |
}; |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
64 |
|
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
65 |
typedef enum { |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
66 |
JVMTI_CMLR_DUMMY = 1, |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
67 |
JVMTI_CMLR_INLINE_INFO = 2 |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
68 |
} jvmtiCMLRKind; |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
69 |
|
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
70 |
/* |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
71 |
* Record that represents arbitrary information passed through JVMTI |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
72 |
* CompiledMethodLoadEvent void pointer. |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
73 |
*/ |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
74 |
typedef struct _jvmtiCompiledMethodLoadRecordHeader { |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
75 |
jvmtiCMLRKind kind; /* id for the kind of info passed in the record */ |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
76 |
jint majorinfoversion; /* major and minor info version values. Init'ed */ |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
77 |
jint minorinfoversion; /* to current version value in jvmtiExport.cpp. */ |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
78 |
|
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
79 |
struct _jvmtiCompiledMethodLoadRecordHeader* next; |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
80 |
} jvmtiCompiledMethodLoadRecordHeader; |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
81 |
|
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
82 |
/* |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
83 |
* Record that gives information about the methods on the compile-time |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
84 |
* stack at a specific pc address of a compiled method. Each element in |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
85 |
* the methods array maps to same element in the bcis array. |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
86 |
*/ |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
87 |
typedef struct _PCStackInfo { |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
88 |
void* pc; /* the pc address for this compiled method */ |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
89 |
jint numstackframes; /* number of methods on the stack */ |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
90 |
jmethodID* methods; /* array of numstackframes method ids */ |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
91 |
jint* bcis; /* array of numstackframes bytecode indices */ |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
92 |
} PCStackInfo; |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
93 |
|
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
94 |
/* |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
95 |
* Record that contains inlining information for each pc address of |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
96 |
* an nmethod. |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
97 |
*/ |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
98 |
typedef struct _jvmtiCompiledMethodLoadInlineRecord { |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
99 |
jvmtiCompiledMethodLoadRecordHeader header; /* common header for casting */ |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
100 |
jint numpcs; /* number of pc descriptors in this nmethod */ |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
101 |
PCStackInfo* pcinfo; /* array of numpcs pc descriptors */ |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
102 |
} jvmtiCompiledMethodLoadInlineRecord; |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
103 |
|
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
104 |
/* |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
105 |
* Dummy record used to test that we can pass records with different |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
106 |
* information through the void pointer provided that they can be cast |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
107 |
* to a jvmtiCompiledMethodLoadRecordHeader. |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
108 |
*/ |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
109 |
|
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
110 |
typedef struct _jvmtiCompiledMethodLoadDummyRecord { |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
111 |
jvmtiCompiledMethodLoadRecordHeader header; /* common header for casting */ |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
112 |
char message[50]; |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
113 |
} jvmtiCompiledMethodLoadDummyRecord; |
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
114 |
|
37f605425f74
6580131: 3/4 CompiledMethodLoad events don't produce the expected extra notifications to describe inlining
dcubed
parents:
diff
changeset
|
115 |
#endif |