Skip to content

Commit 107fb9c

Browse files
committed
8255049: Remove support for the hsdis decode_instructions entry point in hotspot
Reviewed-by: neliasso, kvn
1 parent c1524c5 commit 107fb9c

File tree

2 files changed

+6
-37
lines changed

2 files changed

+6
-37
lines changed

src/hotspot/share/compiler/disassembler.cpp

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,9 @@ bool Disassembler::_library_usable = false;
4848

4949
// This routine is in the shared library:
5050
Disassembler::decode_func_virtual Disassembler::_decode_instructions_virtual = NULL;
51-
Disassembler::decode_func Disassembler::_decode_instructions = NULL;
5251

5352
static const char hsdis_library_name[] = "hsdis-" HOTSPOT_LIB_ARCH;
5453
static const char decode_instructions_virtual_name[] = "decode_instructions_virtual";
55-
static const char decode_instructions_name[] = "decode_instructions";
56-
static bool use_new_version = true;
5754
#define COMMENT_COLUMN 52 LP64_ONLY(+8) /*could be an option*/
5855
#define BYTES_COMMENT ";..." /* funky byte display comment */
5956

@@ -736,34 +733,22 @@ address decode_env::decode_instructions(address start, address end, address orig
736733
// This is mainly for debugging the library itself.
737734
FILE* out = stdout;
738735
FILE* xmlout = (_print_raw > 1 ? out : NULL);
739-
return use_new_version ?
736+
return
740737
(address)
741738
(*Disassembler::_decode_instructions_virtual)((uintptr_t)start, (uintptr_t)end,
742739
start, end - start,
743740
NULL, (void*) xmlout,
744741
NULL, (void*) out,
745-
options(), 0/*nice new line*/)
746-
:
747-
(address)
748-
(*Disassembler::_decode_instructions)(start, end,
749-
NULL, (void*) xmlout,
750-
NULL, (void*) out,
751-
options());
742+
options(), 0/*nice new line*/);
752743
}
753744

754-
return use_new_version ?
745+
return
755746
(address)
756747
(*Disassembler::_decode_instructions_virtual)((uintptr_t)start, (uintptr_t)end,
757748
start, end - start,
758749
&event_to_env, (void*) this,
759750
&printf_to_env, (void*) this,
760-
options(), 0/*nice new line*/)
761-
:
762-
(address)
763-
(*Disassembler::_decode_instructions)(start, end,
764-
&event_to_env, (void*) this,
765-
&printf_to_env, (void*) this,
766-
options());
751+
options(), 0/*nice new line*/);
767752
}
768753

769754
// ----------------------------------------------------------------------------
@@ -853,21 +838,13 @@ bool Disassembler::load_library(outputStream* st) {
853838
_library = os::dll_load(buf, ebuf, sizeof ebuf);
854839
}
855840

856-
// load the decoder function to use (new or old version).
841+
// load the decoder function to use.
857842
if (_library != NULL) {
858843
_decode_instructions_virtual = CAST_TO_FN_PTR(Disassembler::decode_func_virtual,
859844
os::dll_lookup(_library, decode_instructions_virtual_name));
860845
}
861-
if (_decode_instructions_virtual == NULL && _library != NULL) {
862-
// could not spot in new version, try old version
863-
_decode_instructions = CAST_TO_FN_PTR(Disassembler::decode_func,
864-
os::dll_lookup(_library, decode_instructions_name));
865-
use_new_version = false;
866-
} else {
867-
use_new_version = true;
868-
}
869846
_tried_to_load_library = true;
870-
_library_usable = _decode_instructions_virtual != NULL || _decode_instructions != NULL;
847+
_library_usable = _decode_instructions_virtual != NULL;
871848

872849
// Create a dummy environment to initialize PrintAssemblyOptions.
873850
// The PrintAssemblyOptions must be known for abstract disassemblies as well.

src/hotspot/share/compiler/disassembler.hpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,13 @@ class Disassembler : public AbstractDisassembler {
5252
void* printf_stream,
5353
const char* options,
5454
int newline);
55-
// this is the type of the dll entry point for old version:
56-
typedef void* (*decode_func)(void* start_va, void* end_va,
57-
void* (*event_callback)(void*, const char*, void*),
58-
void* event_stream,
59-
int (*printf_callback)(void*, const char*, ...),
60-
void* printf_stream,
61-
const char* options);
6255
// points to the library.
6356
static void* _library;
6457
// bailout
6558
static bool _tried_to_load_library;
6659
static bool _library_usable;
6760
// points to the decode function.
6861
static decode_func_virtual _decode_instructions_virtual;
69-
static decode_func _decode_instructions;
7062

7163
// tries to load library and return whether it succeeded.
7264
// Allow (diagnostic) output redirection.

0 commit comments

Comments
 (0)