< prev index next >

test/hotspot/jtreg/runtime/NMT/CheckForProperDetailStackTrace.java

Print this page
rev 59076 : [mq]: 8243945


  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24  /*
  25  * @test
  26  * @bug 8133747 8218458
  27  * @key nmt
  28  * @summary Running with NMT detail should produce expected stack traces.
  29  * @library /test/lib
  30  * @modules java.base/jdk.internal.misc
  31  *          java.management

  32  */
  33 
  34 import jdk.test.lib.Platform;
  35 import jdk.test.lib.process.ProcessTools;
  36 import jdk.test.lib.process.OutputAnalyzer;
  37 import java.util.regex.Matcher;
  38 import java.util.regex.Pattern;
  39 
  40 /**
  41  * We are checking for details that should be seen with NMT detail enabled.
  42  * In particular the stack traces from os::malloc call sites should have 4
  43  * (based on NMT detail stack depth setting) 'interesting' frames and skip
  44  * the higher-level allocation frames and frames specific to the NMT logic.
  45  * The actual stack trace is affected by the native compiler's inlining ability
  46  * and the type of build, so we need to check for a number of possible stacks.
  47  * This information does not change often enough that we are concerned about the
  48  * stability of this test - rather we prefer to detect changes in compiler behaviour
  49  * through this test and update it accordingly.
  50  */
  51 public class CheckForProperDetailStackTrace {




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24  /*
  25  * @test
  26  * @bug 8133747 8218458
  27  * @key nmt
  28  * @summary Running with NMT detail should produce expected stack traces.
  29  * @library /test/lib
  30  * @modules java.base/jdk.internal.misc
  31  *          java.management
  32  * @run driver CheckForProperDetailStackTrace
  33  */
  34 
  35 import jdk.test.lib.Platform;
  36 import jdk.test.lib.process.ProcessTools;
  37 import jdk.test.lib.process.OutputAnalyzer;
  38 import java.util.regex.Matcher;
  39 import java.util.regex.Pattern;
  40 
  41 /**
  42  * We are checking for details that should be seen with NMT detail enabled.
  43  * In particular the stack traces from os::malloc call sites should have 4
  44  * (based on NMT detail stack depth setting) 'interesting' frames and skip
  45  * the higher-level allocation frames and frames specific to the NMT logic.
  46  * The actual stack trace is affected by the native compiler's inlining ability
  47  * and the type of build, so we need to check for a number of possible stacks.
  48  * This information does not change often enough that we are concerned about the
  49  * stability of this test - rather we prefer to detect changes in compiler behaviour
  50  * through this test and update it accordingly.
  51  */
  52 public class CheckForProperDetailStackTrace {


< prev index next >