src/share/vm/prims/jvmtiTrace.cpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 264,278 **** JavaThread *java_thread = (JavaThread *)thread; oop threadObj = java_thread->threadObj(); if (threadObj == NULL) { return "NULL"; } ! typeArrayOop name = java_lang_Thread::name(threadObj); if (name == NULL) { return "<NOT FILLED IN>"; } ! return UNICODE::as_utf8((jchar*) name->base(T_CHAR), name->length()); } // return the name of the current thread const char *JvmtiTrace::safe_get_current_thread_name() { --- 264,278 ---- JavaThread *java_thread = (JavaThread *)thread; oop threadObj = java_thread->threadObj(); if (threadObj == NULL) { return "NULL"; } ! oop name = java_lang_Thread::name(threadObj); if (name == NULL) { return "<NOT FILLED IN>"; } ! return java_lang_String::as_utf8_string(name); } // return the name of the current thread const char *JvmtiTrace::safe_get_current_thread_name() {