hotspot/src/share/vm/utilities/decoder.hpp
changeset 46630 75aa3e39d02c
parent 31352 a6ab7217b5cc
child 47086 2b35673f6297
equal deleted inserted replaced
46629:8eeacdc76bf2 46630:75aa3e39d02c
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2015, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    30 #include "runtime/mutex.hpp"
    30 #include "runtime/mutex.hpp"
    31 #include "runtime/mutexLocker.hpp"
    31 #include "runtime/mutexLocker.hpp"
    32 
    32 
    33 class AbstractDecoder : public CHeapObj<mtInternal> {
    33 class AbstractDecoder : public CHeapObj<mtInternal> {
    34 public:
    34 public:
       
    35   virtual ~AbstractDecoder() {}
       
    36 
    35   // status code for decoding native C frame
    37   // status code for decoding native C frame
    36   enum decoder_status {
    38   enum decoder_status {
    37          not_available = -10,  // real decoder is not available
    39          not_available = -10,  // real decoder is not available
    38          no_error = 0,         // successfully decoded frames
    40          no_error = 0,         // successfully decoded frames
    39          out_of_memory,        // out of memory
    41          out_of_memory,        // out of memory
    80 public:
    82 public:
    81   NullDecoder() {
    83   NullDecoder() {
    82     _decoder_status = not_available;
    84     _decoder_status = not_available;
    83   }
    85   }
    84 
    86 
    85   ~NullDecoder() {};
    87   virtual ~NullDecoder() {};
    86 
    88 
    87   virtual bool decode(address pc, char* buf, int buflen, int* offset,
    89   virtual bool decode(address pc, char* buf, int buflen, int* offset,
    88                       const char* modulepath, bool demangle) {
    90                       const char* modulepath, bool demangle) {
    89     return false;
    91     return false;
    90   }
    92   }