Skip to content

Commit

Permalink
8297657: name demangling intermittently fails
Browse files Browse the repository at this point in the history
Reviewed-by: stefank, coleenp
  • Loading branch information
fbredber authored and coleenp committed May 11, 2023
1 parent d20034b commit 2bf7ac5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 15 deletions.
6 changes: 2 additions & 4 deletions src/hotspot/os/aix/decoder_aix.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -29,9 +29,7 @@
// Provide simple AIXDecoder which enables decoding of C frames in VM.
class AIXDecoder: public AbstractDecoder {
public:
AIXDecoder() {
_decoder_status = no_error;
}
AIXDecoder() : AbstractDecoder(no_error) {}
virtual ~AIXDecoder() {}

virtual bool demangle(const char* symbol, char* buf, int buflen) { return false; } // use AixSymbols::get_function_name to demangle
Expand Down
6 changes: 2 additions & 4 deletions src/hotspot/os/bsd/decoder_machO.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -29,11 +29,9 @@

#include "utilities/decoder.hpp"

// Just a placehold for now, a real implementation should derive
// from AbstractDecoder
class MachODecoder : public AbstractDecoder {
public:
MachODecoder() { }
MachODecoder() : AbstractDecoder(no_error) { }
virtual ~MachODecoder() { }
virtual bool demangle(const char* symbol, char* buf, int buflen);
virtual bool decode(address pc, char* buf, int buflen, int* offset,
Expand Down
6 changes: 3 additions & 3 deletions src/hotspot/share/utilities/decoder.hpp
Expand Up @@ -48,6 +48,8 @@ class AbstractDecoder : public CHeapObj<mtInternal> {
decoder_status _decoder_status;

public:
AbstractDecoder(decoder_status status) : _decoder_status(status) {}

virtual ~AbstractDecoder() {}

// decode an pc address to corresponding function name and an offset from the beginning of
Expand Down Expand Up @@ -84,9 +86,7 @@ class AbstractDecoder : public CHeapObj<mtInternal> {
// Do nothing decoder
class NullDecoder : public AbstractDecoder {
public:
NullDecoder() {
_decoder_status = not_available;
}
NullDecoder() : AbstractDecoder(not_available) {}

virtual ~NullDecoder() {};

Expand Down
6 changes: 2 additions & 4 deletions src/hotspot/share/utilities/decoder_elf.hpp
Expand Up @@ -33,10 +33,8 @@
class ElfDecoder : public AbstractDecoder {

public:
ElfDecoder() {
_opened_elf_files = nullptr;
_decoder_status = no_error;
}
ElfDecoder() : AbstractDecoder(no_error), _opened_elf_files(nullptr) {}

virtual ~ElfDecoder();

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

1 comment on commit 2bf7ac5

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.