changeset 54493:465beebb1071

8218167: nsk/jvmti/scenarios/sampling/SP02/sp02t003 fails Reviewed-by: dlong, cjplummer
author dtitov
date Tue, 05 Mar 2019 13:41:35 -0800
parents f3468c1bdf5f
children 6ffb8d7fe1e4
files test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP02/sp02t003/sp02t003.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP06/sp06t003/sp06t003.cpp
diffstat 2 files changed, 4 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP02/sp02t003/sp02t003.cpp	Tue Mar 05 13:40:05 2019 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP02/sp02t003/sp02t003.cpp	Tue Mar 05 13:41:35 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -275,7 +275,6 @@
         jint frameCount = 0;
         jint frameStackSize = 0;
         jvmtiFrameInfo frameStack[MAX_STACK_SIZE];
-        int commonDepth = 0;
         int found = 0;
         int j;
 
@@ -296,12 +295,8 @@
         }
         NSK_DISPLAY1("    stack depth: %d\n", (int)frameStackSize);
 
-        commonDepth = (frameCount < frameStackSize ? frameCount : frameStackSize);
-        NSK_DISPLAY1("         common: %d\n", (int)commonDepth);
-
-        /* check first commonDepth frames and find expected method there */
         found = 0;
-        for (j = 0; j < commonDepth; j++) {
+        for (j = 0; j < frameStackSize; j++) {
             jmethodID qMethod = (jmethodID)NULL;
             jlocation qLocation = NSK_JVMTI_INVALID_JLOCATION;
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP06/sp06t003/sp06t003.cpp	Tue Mar 05 13:40:05 2019 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP06/sp06t003/sp06t003.cpp	Tue Mar 05 13:41:35 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -295,7 +295,6 @@
         jint frameCount = 0;
         jint frameStackSize = 0;
         jvmtiFrameInfo frameStack[MAX_STACK_SIZE];
-        int commonDepth = 0;
         int found = 0;
         int j;
 
@@ -319,12 +318,8 @@
         }
         NSK_DISPLAY1("    stack depth: %d\n", (int)frameStackSize);
 
-        commonDepth = (frameCount < frameStackSize ? frameCount : frameStackSize);
-        NSK_DISPLAY1("         common: %d\n", (int)commonDepth);
-
-        /* check first commonDepth frames and find expected method there */
         found = 0;
-        for (j = 0; j < commonDepth; j++) {
+        for (j = 0; j < frameStackSize; j++) {
             jmethodID qMethod = (jmethodID)NULL;
             jlocation qLocation = NSK_JVMTI_INVALID_JLOCATION;