From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29548 invoked by alias); 27 Feb 2008 19:22:17 -0000 Received: (qmail 29522 invoked by uid 367); 27 Feb 2008 19:22:17 -0000 Date: Wed, 27 Feb 2008 19:22:00 -0000 Message-ID: <20080227192217.29506.qmail@sourceware.org> From: cagney@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Use Proc.getMainTask. X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 9d48be0ed86dd7fb9ff9e4a4ab8ff2730d4f6f33 X-Git-Newrev: d65cdc1ffc9f4e023508552b16a530f04c96458a Mailing-List: contact frysk-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-cvs-owner@sourceware.org Reply-To: frysk@sourceware.org X-SW-Source: 2008-q1/txt/msg00268.txt.bz2 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 Date: Wed Feb 27 14:21:25 2008 -0500 Use Proc.getMainTask. frysk-core/frysk/proc/ChangeLog 2008-02-27 Andrew Cagney * 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 + * 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