annotate src/utils/hsdis/hsdis.h @ 58691:0b704fd76583

records: matching of the serialVersionUID is waived for record classes
author chegar
date Fri, 15 Nov 2019 17:01:56 +0000
parents 59b0d8afc831
children
rev   line source
jrose@347 1 /*
minqi@13873 2 * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
jrose@347 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
jrose@347 4 *
dbuck@51885 5 * The Universal Permissive License (UPL), Version 1.0
jrose@347 6 *
dbuck@51885 7 * Subject to the condition set forth below, permission is hereby granted to
dbuck@51885 8 * any person obtaining a copy of this software, associated documentation
dbuck@51885 9 * and/or data (collectively the "Software"), free of charge and under any
dbuck@51885 10 * and all copyright rights in the Software, and any and all patent rights
dbuck@51885 11 * owned or freely licensable by each licensor hereunder covering either (i)
dbuck@51885 12 * the unmodified Software as contributed to or provided by such licensor,
dbuck@51885 13 * or (ii) the Larger Works (as defined below), to deal in both
jrose@347 14 *
dbuck@51885 15 * (a) the Software, and
dbuck@51885 16 *
dbuck@51885 17 * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file
dbuck@51963 18 * if one is included with the Software (each a "Larger Work" to which the
dbuck@51885 19 * Software is contributed by such licensors),
dbuck@51885 20 *
dbuck@51885 21 * without restriction, including without limitation the rights to copy,
dbuck@51885 22 * create derivative works of, display, perform, and distribute the Software
dbuck@51885 23 * and make, use, sell, offer for sale, import, export, have made, and have
dbuck@51885 24 * sold the Software and the Larger Work(s), and to sublicense the foregoing
dbuck@51885 25 * rights on either these or other terms.
dbuck@51885 26 *
dbuck@51885 27 * This license is subject to the following condition:
dbuck@51885 28 *
dbuck@51885 29 * The above copyright notice and either this complete permission notice or
dbuck@51885 30 * at a minimum a reference to the UPL must be included in all copies or
dbuck@51885 31 * substantial portions of the Software.
dbuck@51885 32 *
dbuck@51885 33 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
dbuck@51885 34 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
dbuck@51885 35 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
dbuck@51885 36 * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
dbuck@51885 37 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
dbuck@51885 38 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
dbuck@51885 39 * USE OR OTHER DEALINGS IN THE SOFTWARE.
jrose@347 40 *
trims@5547 41 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@5547 42 * or visit www.oracle.com if you need additional information or have any
trims@5547 43 * questions.
jrose@347 44 *
jrose@347 45 */
jrose@347 46
jrose@347 47 /* decode_instructions -- dump a range of addresses as native instructions
jrose@347 48 This implements the protocol required by the HotSpot PrintAssembly option.
jrose@347 49
minqi@13873 50 The start_va, end_va is the virtual address the region of memory to
minqi@13873 51 disasemble and buffer contains the instructions to decode,
minqi@13873 52 Disassembling instructions in the current address space is done by
minqi@13873 53 having start_va == buffer.
jrose@347 54
jrose@347 55 The option string, if not empty, is interpreted by the disassembler implementation.
jrose@347 56
jrose@347 57 The printf callback is 'fprintf' or any other workalike.
jrose@347 58 It is called as (*printf_callback)(printf_stream, "some format...", some, format, args).
jrose@347 59
jrose@347 60 The event callback receives an event tag (a string) and an argument (a void*).
jrose@347 61 It is called as (*event_callback)(event_stream, "tag", arg).
jrose@347 62
jrose@347 63 Events:
jrose@347 64 <insn pc='%p'> begin an instruction, at a given location
jrose@347 65 </insn pc='%d'> end an instruction, at a given location
jrose@347 66 <addr value='%p'/> emit the symbolic value of an address
jrose@347 67
jrose@347 68 A tag format is one of three basic forms: "tag", "/tag", "tag/",
jrose@347 69 where tag is a simple identifier, signifying (as in XML) a element start,
jrose@347 70 element end, and standalone element. (To render as XML, add angle brackets.)
jrose@347 71 */
minqi@14384 72 #ifndef SHARED_TOOLS_HSDIS_H
minqi@14384 73 #define SHARED_TOOLS_HSDIS_H
minqi@14384 74
jrose@347 75 extern
jrose@347 76 #ifdef DLL_EXPORT
jrose@347 77 DLL_EXPORT
jrose@347 78 #endif
minqi@13873 79 void* decode_instructions_virtual(uintptr_t start_va, uintptr_t end_va,
minqi@13873 80 unsigned char* buffer, uintptr_t length,
minqi@13873 81 void* (*event_callback)(void*, const char*, void*),
minqi@13873 82 void* event_stream,
minqi@13873 83 int (*printf_callback)(void*, const char*, ...),
minqi@13873 84 void* printf_stream,
minqi@14384 85 const char* options,
minqi@14384 86 int newline /* bool value for nice new line */);
minqi@14384 87
minqi@14384 88 /* This is the compatability interface for older versions of hotspot */
minqi@14384 89 extern
minqi@14384 90 #ifdef DLL_ENTRY
minqi@14384 91 DLL_ENTRY
minqi@14384 92 #endif
minqi@14384 93 void* decode_instructions(void* start_pv, void* end_pv,
minqi@14384 94 void* (*event_callback)(void*, const char*, void*),
minqi@14384 95 void* event_stream,
minqi@14384 96 int (*printf_callback)(void*, const char*, ...),
minqi@14384 97 void* printf_stream,
minqi@14384 98 const char* options);
jrose@347 99
jrose@347 100 /* convenience typedefs */
jrose@347 101
jrose@347 102 typedef void* (*decode_instructions_event_callback_ftype) (void*, const char*, void*);
jrose@347 103 typedef int (*decode_instructions_printf_callback_ftype) (void*, const char*, ...);
minqi@14384 104 typedef void* (*decode_func_vtype) (uintptr_t start_va, uintptr_t end_va,
minqi@14384 105 unsigned char* buffer, uintptr_t length,
minqi@14384 106 decode_instructions_event_callback_ftype event_callback,
minqi@14384 107 void* event_stream,
minqi@14384 108 decode_instructions_printf_callback_ftype printf_callback,
minqi@14384 109 void* printf_stream,
minqi@14384 110 const char* options,
minqi@14384 111 int newline);
minqi@14384 112 typedef void* (*decode_func_stype) (void* start_pv, void* end_pv,
minqi@14384 113 decode_instructions_event_callback_ftype event_callback,
minqi@14384 114 void* event_stream,
minqi@14384 115 decode_instructions_printf_callback_ftype printf_callback,
minqi@14384 116 void* printf_stream,
minqi@14384 117 const char* options);
minqi@14384 118 #endif /* SHARED_TOOLS_HSDIS_H */