114 static bool get_source_info(address pc, char* buf, size_t buflen, int* line);
115
116 static void print_state_on(outputStream* st);
117
118 protected:
119 // shared decoder instance, _shared_instance_lock is needed
120 static AbstractDecoder* get_shared_instance();
121 // a private instance for error handler. Error handler can be
122 // triggered almost everywhere, including signal handler, where
123 // no lock can be taken. So the shared decoder can not be used
124 // in this scenario.
125 static AbstractDecoder* get_error_handler_instance();
126
127 static AbstractDecoder* create_decoder();
128 private:
129 static AbstractDecoder* _shared_decoder;
130 static AbstractDecoder* _error_handler_decoder;
131 static NullDecoder _do_nothing_decoder;
132
133 protected:
134 static Mutex* _shared_decoder_lock;
135 static Mutex* shared_decoder_lock();
136
137 friend class DecoderLocker;
138 };
139
140 class DecoderLocker : public MutexLockerEx {
141 AbstractDecoder* _decoder;
142 inline bool is_first_error_thread();
143 public:
144 DecoderLocker();
145 AbstractDecoder* decoder() {
146 return _decoder;
147 }
148 };
149
150 #endif // SHARE_VM_UTILITIES_DECODER_HPP
|
114 static bool get_source_info(address pc, char* buf, size_t buflen, int* line);
115
116 static void print_state_on(outputStream* st);
117
118 protected:
119 // shared decoder instance, _shared_instance_lock is needed
120 static AbstractDecoder* get_shared_instance();
121 // a private instance for error handler. Error handler can be
122 // triggered almost everywhere, including signal handler, where
123 // no lock can be taken. So the shared decoder can not be used
124 // in this scenario.
125 static AbstractDecoder* get_error_handler_instance();
126
127 static AbstractDecoder* create_decoder();
128 private:
129 static AbstractDecoder* _shared_decoder;
130 static AbstractDecoder* _error_handler_decoder;
131 static NullDecoder _do_nothing_decoder;
132
133 protected:
134 static Mutex* shared_decoder_lock();
135
136 friend class DecoderLocker;
137 };
138
139 class DecoderLocker : public MutexLockerEx {
140 AbstractDecoder* _decoder;
141 inline bool is_first_error_thread();
142 public:
143 DecoderLocker();
144 AbstractDecoder* decoder() {
145 return _decoder;
146 }
147 };
148
149 #endif // SHARE_VM_UTILITIES_DECODER_HPP
|