diff graal/com.oracle.graal.debug.test/src/com/oracle/graal/debug/test/DebugTimerTest.java @ 19693:fa75218e3942

Fix nested Timer and MemUse tracking logic
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Tue, 03 Mar 2015 10:32:17 -0800
parents d044ca4a1cdc
children
line wrap: on
line diff
--- a/graal/com.oracle.graal.debug.test/src/com/oracle/graal/debug/test/DebugTimerTest.java	Tue Mar 03 16:10:35 2015 +0100
+++ b/graal/com.oracle.graal.debug.test/src/com/oracle/graal/debug/test/DebugTimerTest.java	Tue Mar 03 10:32:17 2015 -0800
@@ -29,7 +29,6 @@
 import org.junit.*;
 
 import com.oracle.graal.debug.*;
-import com.oracle.graal.debug.internal.*;
 
 public class DebugTimerTest {
 
@@ -63,9 +62,9 @@
             long spinA;
             long spinB;
 
-            try (TimerCloseable a1 = timerA.start()) {
+            try (DebugCloseable a1 = timerA.start()) {
                 spinA = spin(50);
-                try (TimerCloseable b1 = timerB.start()) {
+                try (DebugCloseable b1 = timerB.start()) {
                     spinB = spin(50);
                 }
             }
@@ -83,15 +82,15 @@
         DebugConfig debugConfig = Debug.fixedConfig(0, 0, false, false, true, false, null, null, System.out);
         try (DebugConfigScope dcs = new DebugConfigScope(debugConfig); Debug.Scope s = Debug.scope("DebugTimerTest")) {
             DebugTimer timerC = Debug.timer("TimerC");
-            try (TimerCloseable c1 = timerC.start()) {
+            try (DebugCloseable c1 = timerC.start()) {
                 spin(50);
-                try (TimerCloseable c2 = timerC.start()) {
+                try (DebugCloseable c2 = timerC.start()) {
                     spin(50);
-                    try (TimerCloseable c3 = timerC.start()) {
+                    try (DebugCloseable c3 = timerC.start()) {
                         spin(50);
-                        try (TimerCloseable c4 = timerC.start()) {
+                        try (DebugCloseable c4 = timerC.start()) {
                             spin(50);
-                            try (TimerCloseable c5 = timerC.start()) {
+                            try (DebugCloseable c5 = timerC.start()) {
                                 spin(50);
                             }
                         }
@@ -115,13 +114,13 @@
             long spinD1;
             long spinE;
 
-            try (TimerCloseable d1 = timerD.start()) {
+            try (DebugCloseable d1 = timerD.start()) {
                 spinD1 = spin(50);
-                try (TimerCloseable e1 = timerE.start()) {
+                try (DebugCloseable e1 = timerE.start()) {
                     spinE = spin(50);
-                    try (TimerCloseable d2 = timerD.start()) {
+                    try (DebugCloseable d2 = timerD.start()) {
                         spin(50);
-                        try (TimerCloseable d3 = timerD.start()) {
+                        try (DebugCloseable d3 = timerD.start()) {
                             spin(50);
                         }
                     }