Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

Analyze.java

00001 package gov.nasa.arc.ase.jpf.jvm.runtime;
00002 
00003 import java.util.*;
00004 import de.fub.bytecode.classfile.*;
00005 import gov.nasa.arc.ase.jpf.*;
00006 import gov.nasa.arc.ase.jpf.jvm.*;
00007 import gov.nasa.arc.ase.util.Debug;
00008 
00009 public class Analyze {
00010 //#endif RACE
00011   public static void debug_info(String msg) {
00012 // ifdef DEBUG_RACE
00013 
00014 //#endif DEBUG_RACE
00015   }  
00016   public static boolean debug_on() {
00017     return Debug.getDebugLevel(Debug.RACE) > 0;
00018   }  
00019   public static void debugPostAccess(LockStatus lock_status) {
00020     if (debug_on()) {
00021       println(" -- After Access: --");
00022       lock_status.print();
00023     }
00024   }  
00025   public static void debugPreAccess(ThreadInfo th, 
00026       String className, 
00027       String fieldName, 
00028       Ref ref,
00029       String kind, 
00030       long value,
00031       LockStatus lock_status) {
00032     if (debug_on()) {
00033       println("---------------------");
00034       println("Thread : " + th.getThreadReference());
00035       println(kind 
00036       + " "
00037       + className 
00038       + "[" + ref + "]"
00039       + "." + fieldName + " = " + value);
00040       LockSet locks_held  = th.getLockSet();
00041       locks_held.print();
00042       lock_status.print();
00043     }
00044   }  
00045 // ifdef RACE
00046   public static boolean on() {  
00047     return VirtualMachine.options.race;
00048   }  
00049   public static void print(String msg) {
00050     Debug.print(Debug.WARNING, msg);
00051   }  
00052   public static void println(String msg) {
00053     Debug.println(Debug.WARNING, msg);
00054   }  
00055 }

Generated at Thu Feb 7 06:38:33 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001