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