hotspot/src/share/vm/utilities/decoder.cpp
changeset 31352 a6ab7217b5cc
parent 28163 322d55d167be
child 47086 2b35673f6297
equal deleted inserted replaced
31351:aae7db185576 31352:a6ab7217b5cc
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2015, 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.
   100 Mutex* Decoder::shared_decoder_lock() {
   100 Mutex* Decoder::shared_decoder_lock() {
   101   assert(_shared_decoder_lock != NULL, "Just check");
   101   assert(_shared_decoder_lock != NULL, "Just check");
   102   return _shared_decoder_lock;
   102   return _shared_decoder_lock;
   103 }
   103 }
   104 
   104 
   105 bool Decoder::decode(address addr, char* buf, int buflen, int* offset, const char* modulepath) {
   105 bool Decoder::decode(address addr, char* buf, int buflen, int* offset, const char* modulepath, bool demangle) {
   106   assert(_shared_decoder_lock != NULL, "Just check");
   106   assert(_shared_decoder_lock != NULL, "Just check");
   107   bool error_handling_thread = os::current_thread_id() == VMError::first_error_tid;
   107   bool error_handling_thread = os::current_thread_id() == VMError::first_error_tid;
   108   MutexLockerEx locker(error_handling_thread ? NULL : _shared_decoder_lock, true);
   108   MutexLockerEx locker(error_handling_thread ? NULL : _shared_decoder_lock, true);
   109   AbstractDecoder* decoder = error_handling_thread ?
   109   AbstractDecoder* decoder = error_handling_thread ?
   110     get_error_handler_instance(): get_shared_instance();
   110     get_error_handler_instance(): get_shared_instance();
   111   assert(decoder != NULL, "null decoder");
   111   assert(decoder != NULL, "null decoder");
   112 
   112 
   113   return decoder->decode(addr, buf, buflen, offset, modulepath);
   113   return decoder->decode(addr, buf, buflen, offset, modulepath, demangle);
   114 }
   114 }
   115 
   115 
   116 bool Decoder::decode(address addr, char* buf, int buflen, int* offset, const void* base) {
   116 bool Decoder::decode(address addr, char* buf, int buflen, int* offset, const void* base) {
   117   assert(_shared_decoder_lock != NULL, "Just check");
   117   assert(_shared_decoder_lock != NULL, "Just check");
   118   bool error_handling_thread = os::current_thread_id() == VMError::first_error_tid;
   118   bool error_handling_thread = os::current_thread_id() == VMError::first_error_tid;