equal
deleted
inserted
replaced
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()) { |