src/hotspot/share/jfr/support/jfrThreadLocal.cpp
changeset 58084 cddef3bde924
parent 55571 49102ba8cf14
child 58132 caa25ab47aca
child 58154 060d9d139109
equal deleted inserted replaced
58083:9046db64ca39 58084:cddef3bde924
     1 /*
     1 /*
     2  * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2012, 2019, 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.
   115   }
   115   }
   116   if (tl->has_java_event_writer()) {
   116   if (tl->has_java_event_writer()) {
   117     assert(t->is_Java_thread(), "invariant");
   117     assert(t->is_Java_thread(), "invariant");
   118     JfrJavaSupport::destroy_global_jni_handle(tl->java_event_writer());
   118     JfrJavaSupport::destroy_global_jni_handle(tl->java_event_writer());
   119   }
   119   }
   120   if (tl->_stackframes != NULL) {
   120   FREE_C_HEAP_ARRAY(JfrStackFrame, tl->_stackframes);
   121     FREE_C_HEAP_ARRAY(JfrStackFrame, tl->_stackframes);
       
   122   }
       
   123   tl->_dead = true;
   121   tl->_dead = true;
   124 }
   122 }
   125 
   123 
   126 void JfrThreadLocal::on_exit(Thread* t) {
   124 void JfrThreadLocal::on_exit(Thread* t) {
   127   assert(t != NULL, "invariant");
   125   assert(t != NULL, "invariant");