hotspot/src/share/vm/utilities/decoder.hpp
changeset 47086 2b35673f6297
parent 46630 75aa3e39d02c
equal deleted inserted replaced
46999:dd86717fe58b 47086:2b35673f6297
    27 #define SHARE_VM_UTILITIES_DECODER_HPP
    27 #define SHARE_VM_UTILITIES_DECODER_HPP
    28 
    28 
    29 #include "memory/allocation.hpp"
    29 #include "memory/allocation.hpp"
    30 #include "runtime/mutex.hpp"
    30 #include "runtime/mutex.hpp"
    31 #include "runtime/mutexLocker.hpp"
    31 #include "runtime/mutexLocker.hpp"
       
    32 #include "utilities/ostream.hpp"
    32 
    33 
    33 class AbstractDecoder : public CHeapObj<mtInternal> {
    34 class AbstractDecoder : public CHeapObj<mtInternal> {
    34 public:
    35 public:
    35   virtual ~AbstractDecoder() {}
    36   virtual ~AbstractDecoder() {}
    36 
    37 
    39          not_available = -10,  // real decoder is not available
    40          not_available = -10,  // real decoder is not available
    40          no_error = 0,         // successfully decoded frames
    41          no_error = 0,         // successfully decoded frames
    41          out_of_memory,        // out of memory
    42          out_of_memory,        // out of memory
    42          file_invalid,         // invalid elf file
    43          file_invalid,         // invalid elf file
    43          file_not_found,       // could not found symbol file (on windows), such as jvm.pdb or jvm.map
    44          file_not_found,       // could not found symbol file (on windows), such as jvm.pdb or jvm.map
    44          helper_not_found,     // could not load dbghelp.dll (Windows only)
       
    45          helper_func_error,    // decoding functions not found (Windows only)
    45          helper_func_error,    // decoding functions not found (Windows only)
    46          helper_init_error     // SymInitialize failed (Windows only)
    46          helper_init_error     // SymInitialize failed (Windows only)
    47   };
    47   };
    48 
    48 
    49   // decode an pc address to corresponding function name and an offset from the beginning of
    49   // decode an pc address to corresponding function name and an offset from the beginning of
   115   static bool demangle(const char* symbol, char* buf, int buflen);
   115   static bool demangle(const char* symbol, char* buf, int buflen);
   116   static bool can_decode_C_frame_in_vm();
   116   static bool can_decode_C_frame_in_vm();
   117 
   117 
   118   // shutdown shared instance
   118   // shutdown shared instance
   119   static void shutdown();
   119   static void shutdown();
       
   120 
       
   121   static void print_state_on(outputStream* st);
       
   122 
   120 protected:
   123 protected:
   121   // shared decoder instance, _shared_instance_lock is needed
   124   // shared decoder instance, _shared_instance_lock is needed
   122   static AbstractDecoder* get_shared_instance();
   125   static AbstractDecoder* get_shared_instance();
   123   // a private instance for error handler. Error handler can be
   126   // a private instance for error handler. Error handler can be
   124   // triggered almost everywhere, including signal handler, where
   127   // triggered almost everywhere, including signal handler, where