< prev index next >

src/hotspot/share/utilities/decoder.hpp

Print this page




  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 
  26 #ifndef SHARE_VM_UTILITIES_DECODER_HPP
  27 #define SHARE_VM_UTILITIES_DECODER_HPP
  28 
  29 #include "memory/allocation.hpp"
  30 #include "runtime/mutex.hpp"
  31 #include "runtime/mutexLocker.hpp"
  32 #include "utilities/ostream.hpp"
  33 
  34 class AbstractDecoder : public CHeapObj<mtInternal> {
  35 public:
  36   // status code for decoding native C frame
  37   enum decoder_status {
  38          not_available = -10,  // real decoder is not available
  39          no_error = 0,         // no error encountered

  40          out_of_memory,        // out of memory
  41          file_invalid,         // invalid elf file
  42          file_not_found,       // could not found symbol file (on windows), such as jvm.pdb or jvm.map
  43          helper_func_error,    // decoding functions not found (Windows only)
  44          helper_init_error     // SymInitialize failed (Windows only)
  45   };
  46 
  47 protected:
  48   decoder_status  _decoder_status;
  49 
  50 public:
  51   virtual ~AbstractDecoder() {}
  52 
  53   // decode an pc address to corresponding function name and an offset from the beginning of
  54   // the function
  55   //
  56   // Note: the 'base' variant does not demangle names. The
  57   // demangling that was done systematically in the 'modulepath' variant
  58   // is now optional.
  59   virtual bool decode(address pc, char* buf, int buflen, int* offset,




  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 
  26 #ifndef SHARE_VM_UTILITIES_DECODER_HPP
  27 #define SHARE_VM_UTILITIES_DECODER_HPP
  28 
  29 #include "memory/allocation.hpp"
  30 #include "runtime/mutex.hpp"
  31 #include "runtime/mutexLocker.hpp"
  32 #include "utilities/ostream.hpp"
  33 
  34 class AbstractDecoder : public CHeapObj<mtInternal> {
  35 public:
  36   // status code for decoding native C frame
  37   enum decoder_status {
  38          not_available = -10,  // real decoder is not available
  39          no_error = 0,         // no error encountered
  40          no_debug_symbols,     // no debug symbol ELF section
  41          out_of_memory,        // out of memory
  42          file_invalid,         // invalid elf file
  43          file_not_found,       // could not found symbol file (on windows), such as jvm.pdb or jvm.map
  44          helper_func_error,    // decoding functions not found (Windows only)
  45          helper_init_error     // SymInitialize failed (Windows only)
  46   };
  47 
  48 protected:
  49   decoder_status  _decoder_status;
  50 
  51 public:
  52   virtual ~AbstractDecoder() {}
  53 
  54   // decode an pc address to corresponding function name and an offset from the beginning of
  55   // the function
  56   //
  57   // Note: the 'base' variant does not demangle names. The
  58   // demangling that was done systematically in the 'modulepath' variant
  59   // is now optional.
  60   virtual bool decode(address pc, char* buf, int buflen, int* offset,


< prev index next >