public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: Use Proc.getMainTask.
@ 2008-02-27 19:22 cagney
  0 siblings, 0 replies; only message in thread
From: cagney @ 2008-02-27 19:22 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  d65cdc1ffc9f4e023508552b16a530f04c96458a (commit)
      from  9d48be0ed86dd7fb9ff9e4a4ab8ff2730d4f6f33 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit d65cdc1ffc9f4e023508552b16a530f04c96458a
Author: Andrew Cagney <cagney@redhat.com>
Date:   Wed Feb 27 14:21:25 2008 -0500

    Use Proc.getMainTask.
    
    frysk-core/frysk/proc/ChangeLog
    2008-02-27  Andrew Cagney  <cagney@redhat.com>
    
    	* ProcTasksObserver.java: Use Proc.getMainTask.  Use Log.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/proc/ChangeLog              |    2 +
 frysk-core/frysk/proc/ProcTasksObserver.java |   27 ++++++++++---------------
 2 files changed, 13 insertions(+), 16 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/proc/ChangeLog b/frysk-core/frysk/proc/ChangeLog
index 64bdc69..e488180 100644
--- a/frysk-core/frysk/proc/ChangeLog
+++ b/frysk-core/frysk/proc/ChangeLog
@@ -1,5 +1,7 @@
 2008-02-27  Andrew Cagney  <cagney@redhat.com>
 
+	* ProcTasksObserver.java: Use Proc.getMainTask.  Use Log.
+
 	* Proc.java (taskPool): Make private.
 
 	* Task.java (getTaskId()): Make package private.
diff --git a/frysk-core/frysk/proc/ProcTasksObserver.java b/frysk-core/frysk/proc/ProcTasksObserver.java
index 075bbdc..93da00a 100644
--- a/frysk-core/frysk/proc/ProcTasksObserver.java
+++ b/frysk-core/frysk/proc/ProcTasksObserver.java
@@ -41,8 +41,7 @@ package frysk.proc;
 
 import frysk.isa.signals.Signal;
 import java.util.Iterator;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import frysk.rsl.Log;
 import frysk.event.Event;
 
 /**
@@ -54,7 +53,7 @@ import frysk.event.Event;
 public final class ProcTasksObserver
     implements TaskObserver.Cloned, TaskObserver.Terminated
 {
-    protected static final Logger logger = Logger.getLogger(ProcLogger.LOGGER_ID);
+    private static final Log fine = Log.fine(ProcTasksObserver.class);
     private final Proc proc;
     private final ProcObserver.ProcTasks procTasksObserver;
     private Task mainTask;
@@ -66,23 +65,20 @@ public final class ProcTasksObserver
     public ProcTasksObserver (Proc theProc, 
 			      ProcObserver.ProcTasks theProcTasksObserver)
     {
-	logger.log (Level.FINE, "{0} new\n", this); 
+	fine.log(this, "new");
 	proc = theProc;
 	procTasksObserver = theProcTasksObserver;
 		
 	// The rest of the construction must be done synchronous to
 	// the EventLoop, schedule it.
-	Manager.eventLoop.add (new Event ()
-	    {
-		public void execute ()
-		{
+	Manager.eventLoop.add(new Event() {
+		public void execute() {
 		    // Get a preliminary list of tasks - XXX: hack really.
 		    proc.sendRefresh ();
-				
-		    mainTask = Manager.host.get (new TaskId (proc.getPid ()));
+		    mainTask = proc.getMainTask();
 		    if (mainTask == null) {
-			logger.log (Level.FINE, "Could not get main thread of " +
-				    "this process\n {0}", proc);
+			fine.log(this, "Could not get main thread of "
+				 + "process", proc);
 			procTasksObserver.addFailed (proc,
 						     new RuntimeException ("Process lost: could not " +
 									   "get the main thread of this process.\n" + 
@@ -116,9 +112,8 @@ public final class ProcTasksObserver
 					 Task offspring)
     {
 	procTasksObserver.taskAdded (offspring);
-	logger.log (Level.FINE, "ProcTasksObserver.updateClonedOffspring() " +
-		    "parent: {0} offspring: {1}\n", 
-		    new Object[] { parent, offspring});
+	fine.log(this, "ProcTasksObserver.updateClonedOffspring "
+		 + "parent", parent, "offspring", offspring);
 	requestAddObservers(offspring);
 	// Need to BLOCK and UNBLOCK so that the
 	// request to add an observer has enough time
@@ -139,7 +134,7 @@ public final class ProcTasksObserver
 		Task task = (Task) iterator.next();
 		procTasksObserver.existingTask (task);
 		if (task != mainTask) {
-		    logger.log (Level.FINE, "{0} Inside if not mainTask\n", this);
+		    fine.log(this, "Inside if not mainTask");
 		    requestAddObservers(task);
 		}
 	    }


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-02-27 19:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-27 19:22 [SCM] master: Use Proc.getMainTask cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).