Skip to content

Commit 2bf7ac5

Browse files
fbredbercoleenp
authored andcommitted
8297657: name demangling intermittently fails
Reviewed-by: stefank, coleenp
1 parent d20034b commit 2bf7ac5

File tree

4 files changed

+9
-15
lines changed

4 files changed

+9
-15
lines changed

src/hotspot/os/aix/decoder_aix.hpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
33
* Copyright (c) 2013 SAP SE. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
@@ -29,9 +29,7 @@
2929
// Provide simple AIXDecoder which enables decoding of C frames in VM.
3030
class AIXDecoder: public AbstractDecoder {
3131
public:
32-
AIXDecoder() {
33-
_decoder_status = no_error;
34-
}
32+
AIXDecoder() : AbstractDecoder(no_error) {}
3533
virtual ~AIXDecoder() {}
3634

3735
virtual bool demangle(const char* symbol, char* buf, int buflen) { return false; } // use AixSymbols::get_function_name to demangle

src/hotspot/os/bsd/decoder_machO.hpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -29,11 +29,9 @@
2929

3030
#include "utilities/decoder.hpp"
3131

32-
// Just a placehold for now, a real implementation should derive
33-
// from AbstractDecoder
3432
class MachODecoder : public AbstractDecoder {
3533
public:
36-
MachODecoder() { }
34+
MachODecoder() : AbstractDecoder(no_error) { }
3735
virtual ~MachODecoder() { }
3836
virtual bool demangle(const char* symbol, char* buf, int buflen);
3937
virtual bool decode(address pc, char* buf, int buflen, int* offset,

src/hotspot/share/utilities/decoder.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ class AbstractDecoder : public CHeapObj<mtInternal> {
4848
decoder_status _decoder_status;
4949

5050
public:
51+
AbstractDecoder(decoder_status status) : _decoder_status(status) {}
52+
5153
virtual ~AbstractDecoder() {}
5254

5355
// decode an pc address to corresponding function name and an offset from the beginning of
@@ -84,9 +86,7 @@ class AbstractDecoder : public CHeapObj<mtInternal> {
8486
// Do nothing decoder
8587
class NullDecoder : public AbstractDecoder {
8688
public:
87-
NullDecoder() {
88-
_decoder_status = not_available;
89-
}
89+
NullDecoder() : AbstractDecoder(not_available) {}
9090

9191
virtual ~NullDecoder() {};
9292

src/hotspot/share/utilities/decoder_elf.hpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@
3333
class ElfDecoder : public AbstractDecoder {
3434

3535
public:
36-
ElfDecoder() {
37-
_opened_elf_files = nullptr;
38-
_decoder_status = no_error;
39-
}
36+
ElfDecoder() : AbstractDecoder(no_error), _opened_elf_files(nullptr) {}
37+
4038
virtual ~ElfDecoder();
4139

4240
bool demangle(const char* symbol, char *buf, int buflen);

0 commit comments

Comments
 (0)