< prev index next >

src/hotspot/share/jfr/periodic/sampling/jfrCallTrace.cpp

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, 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.

@@ -25,21 +25,22 @@
 #include "precompiled.hpp"
 #include "code/debugInfoRec.hpp"
 #include "code/nmethod.hpp"
 #include "code/pcDesc.hpp"
 #include "jfr/periodic/sampling/jfrCallTrace.hpp"
+#include "jfr/recorder/service/jfrOptionSet.hpp"
 #include "oops/method.hpp"
 #include "runtime/javaCalls.hpp"
 #include "runtime/frame.inline.hpp"
 #include "runtime/registerMap.hpp"
 #include "runtime/thread.inline.hpp"
 
 bool JfrGetCallTrace::find_top_frame(frame& top_frame, Method** method, frame& first_frame) {
   assert(top_frame.cb() != NULL, "invariant");
   RegisterMap map(_thread, false);
   frame candidate = top_frame;
-  for (int i = 0; i < MaxJavaStackTraceDepth * 2; ++i) {
+  for (int i = 0; i < (JfrOptionSet::stackdepth() * 2); ++i) {
     if (candidate.is_entry_frame()) {
       JavaCallWrapper *jcw = candidate.entry_frame_call_wrapper_if_safe(_thread);
       if (jcw == NULL || jcw->is_first_frame()) {
         return false;
       }
< prev index next >