src/hotspot/share/jfr/recorder/stacktrace/jfrStackTraceRepository.cpp
changeset 53775 5d20b085d893
parent 51263 b5aac518b097
child 54603 cb8e16d6ff1e
equal deleted inserted replaced
53774:622c26f0673f 53775:5d20b085d893
     1 /*
     1 /*
     2  * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2011, 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.
   381   }
   381   }
   382   _lineno = true;
   382   _lineno = true;
   383 }
   383 }
   384 
   384 
   385 bool JfrStackTrace::record_safe(JavaThread* thread, int skip, bool leakp /* false */) {
   385 bool JfrStackTrace::record_safe(JavaThread* thread, int skip, bool leakp /* false */) {
   386   assert(SafepointSynchronize::safepoint_safe(thread, thread->thread_state())
   386   assert(thread == Thread::current(), "Thread stack needs to be walkable");
   387          || thread == Thread::current(), "Thread stack needs to be walkable");
       
   388   vframeStream vfs(thread);
   387   vframeStream vfs(thread);
   389   u4 count = 0;
   388   u4 count = 0;
   390   _reached_root = true;
   389   _reached_root = true;
   391   for(int i = 0; i < skip; i++) {
   390   for(int i = 0; i < skip; i++) {
   392     if (vfs.at_end()) {
   391     if (vfs.at_end()) {