public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: Delete Proc.creator.
@ 2008-03-15 20:45 cagney
  0 siblings, 0 replies; only message in thread
From: cagney @ 2008-03-15 20:45 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  bd4817addf53c6db24ad95bd2181797434a90b12 (commit)
       via  9668d86802145d2a02077e19255104b2e1f6b9fe (commit)
      from  351653635e7bc30d6a5f0d5abdb0d31ab25d1fd5 (commit)

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

- Log -----------------------------------------------------------------
commit bd4817addf53c6db24ad95bd2181797434a90b12
Author: Andrew Cagney <cagney@redhat.com>
Date:   Sat Mar 15 16:45:03 2008 -0400

    Delete Proc.creator.
    
    frysk-core/frysk/proc/ChangeLog
    2008-03-15  Andrew Cagney  <cagney@redhat.com>
    
    	* Proc.java (creator): Delete.
    	(Proc(int,Proc,Host)): Replace Proc(int,Proc,Host,Task).

commit 9668d86802145d2a02077e19255104b2e1f6b9fe
Author: Andrew Cagney <cagney@redhat.com>
Date:   Sat Mar 15 15:42:18 2008 -0400

    Delete unused Task.creator.
    
    frysk-core/frysk/proc/ChangeLog
    2008-03-15  Andrew Cagney  <cagney@redhat.com>
    
    	* Task.java (creator): Delete.
    	(getCreator()): Delete.
    	(Task(int,Proc)): Replace Task(int,Proc,Task).
    	(Task(Proc)): Replace Task(Proc,TaskObserver.Attached).
    
    frysk-core/frysk/proc/live/ChangeLog
    2008-03-15  Andrew Cagney  <cagney@redhat.com>
    
    	* LiveTask.java: Update to match Task.java.
    	* LinuxPtraceTask.java: Ditto.

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

Summary of changes:
 frysk-core/frysk/proc/ChangeLog                 |   10 +++
 frysk-core/frysk/proc/Proc.java                 |   15 +---
 frysk-core/frysk/proc/Task.java                 |   75 +++++++++--------------
 frysk-core/frysk/proc/live/ChangeLog            |    3 +
 frysk-core/frysk/proc/live/LinuxPtraceTask.java |    2 +-
 frysk-core/frysk/proc/live/LiveTask.java        |    5 +-
 6 files changed, 50 insertions(+), 60 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/proc/ChangeLog b/frysk-core/frysk/proc/ChangeLog
index 3cab047..58cf57c 100644
--- a/frysk-core/frysk/proc/ChangeLog
+++ b/frysk-core/frysk/proc/ChangeLog
@@ -1,3 +1,13 @@
+2008-03-15  Andrew Cagney  <cagney@redhat.com>
+
+	* Proc.java (creator): Delete.
+	(Proc(int,Proc,Host)): Replace Proc(int,Proc,Host,Task).
+
+	* Task.java (creator): Delete.
+	(getCreator()): Delete.
+	(Task(int,Proc)): Replace Task(int,Proc,Task).
+	(Task(Proc)): Replace Task(Proc,TaskObserver.Attached).
+
 2008-03-14  Andrew Cagney  <cagney@redhat.com>
 
 	* Proc.java (quitLatch): Delete.
diff --git a/frysk-core/frysk/proc/Proc.java b/frysk-core/frysk/proc/Proc.java
index 9175c13..d8cad3b 100644
--- a/frysk-core/frysk/proc/Proc.java
+++ b/frysk-core/frysk/proc/Proc.java
@@ -62,12 +62,6 @@ public abstract class Proc implements Comparable {
     private static final Log fine = Log.fine(Proc.class);
 
     /**
-     * If known, due to the tracing of a fork, the Task that created
-     * this process.
-     */
-    final Task creator;
-
-    /**
      * XXX: This should not be public.
      */
     public Proc parent;
@@ -142,11 +136,10 @@ public abstract class Proc implements Comparable {
      * Create a new Proc skeleton. Since PARENT could be NULL,
      * explicitly specify the HOST.
      */
-    private Proc(int pid, Proc parent, Host host, Task creator) {
+    private Proc(int pid, Proc parent, Host host) {
 	this.host = host;
 	this.pid = pid;
 	this.parent = parent;
-	this.creator = creator;
 	// Keep parent informed.
 	if (parent != null)
 	    parent.add(this);
@@ -157,7 +150,7 @@ public abstract class Proc implements Comparable {
      * NULL, explicitly specify the HOST.
      */
     protected Proc(Host host, Proc parent, int pid) {
-	this(pid, parent, host, null);
+	this(pid, parent, host);
 	fine.log(this, "new - create unattached running proc");
     }
 
@@ -171,8 +164,8 @@ public abstract class Proc implements Comparable {
      * a Task, while it has the Observable, it doesn't have the
      * containing proc.
      */
-    protected Proc(Task task, int fork) {
-	this(fork, task.getProc(), task.getProc().getHost(), task);
+    protected Proc(Task forkingTask, int fork) {
+	this(fork, forkingTask.getProc(), forkingTask.getProc().getHost());
 	fine.log(this, "new - create attached running proc");
     }
 
diff --git a/frysk-core/frysk/proc/Task.java b/frysk-core/frysk/proc/Task.java
index 56b3b84..06fc24a 100644
--- a/frysk-core/frysk/proc/Task.java
+++ b/frysk-core/frysk/proc/Task.java
@@ -56,12 +56,37 @@ public abstract class Task {
     private static final Log fine = Log.fine(Task.class);
 
     /**
-     * If known, as a result of tracing clone or fork, the task that
-     * created this task.
+     * Create a new Task skeleton.
+     */
+    private Task(int pid, Proc proc) {
+	this.proc = proc;
+	this.tid = pid;
+	this.id = new TaskId(pid);
+	proc.add(this);
+    }
+
+    /**
+     * Create a new unattached Task.
+     */
+    protected Task(Proc proc, int pid) {
+	this(pid, proc);
+	fine.log("new -- create unattached");
+    }
+
+    /**
+     * Create a new attached CLONE of TASK.
+     */
+    protected Task(Task cloningTask, int clone) {
+	this(clone, cloningTask.getProc());
+	fine.log(this, "new -- create attached clone");
+    }
+
+    /**
+     * Create a newly created and attached main Task of Proc that is
+     * the result of a fork.
      */
-    private final Task creator;
-    public Task getCreator() {
-	return creator;
+    protected Task(Proc proc) {
+	this(proc.getPid(), proc);
     }
 
     /**
@@ -117,46 +142,6 @@ public abstract class Task {
     }
     private final Proc proc;
 
-    /**
-     * Create a new Task skeleton.
-     */
-    private Task(int pid, Proc proc, Task creator) {
-	this.proc = proc;
-	this.tid = pid;
-	this.creator = creator;
-	this.id = new TaskId(pid);
-	proc.add(this);
-    }
-
-    /**
-     * Create a new unattached Task.
-     */
-    protected Task(Proc proc, int pid) {
-	this(pid, proc, null);
-	fine.log("new -- create unattached");
-    }
-
-    /**
-     * Create a new attached CLONE of TASK.
-     */
-    protected Task(Task task, int clone) {
-	this(clone, task.proc, task);
-	fine.log(this, "new -- create attached clone");
-    }
-
-    /**
-     * Create a new attached main Task of Proc. If Attached observer
-     * is specified assume it should be attached, otherwize, assume
-     * that, as soon as the task stops, it should be detached. Note
-     * the chicken-egg problem here: to add the initial observation
-     * the Proc needs the Task (which has the Observable).
-     * Conversely, for a Task, while it has the Observable, it doesn't
-     * have the containing proc.
-     */
-    protected Task(Proc proc, TaskObserver.Attached attached) {
-	this(proc.getPid(), proc, proc.creator);
-    }
-
     public class TaskEventObservable extends java.util.Observable {
 	protected void notify(Object o) {
 	    setChanged();
diff --git a/frysk-core/frysk/proc/live/ChangeLog b/frysk-core/frysk/proc/live/ChangeLog
index 385e477..2810aa2 100644
--- a/frysk-core/frysk/proc/live/ChangeLog
+++ b/frysk-core/frysk/proc/live/ChangeLog
@@ -1,5 +1,8 @@
 2008-03-15  Andrew Cagney  <cagney@redhat.com>
 
+	* LiveTask.java: Update to match Task.java.
+	* LinuxPtraceTask.java: Ditto.
+
 	* LinuxPtraceTask.java (LinuxPtraceTask(LinuxPtraceTask,
 	LinuxPtraceProc,Attached)): Add LinuxPtraceTask parameter.	
 	(notifyClonedOffspring(), notifyForkedOffspring()): Simplify.
diff --git a/frysk-core/frysk/proc/live/LinuxPtraceTask.java b/frysk-core/frysk/proc/live/LinuxPtraceTask.java
index 4f27937..20400fa 100644
--- a/frysk-core/frysk/proc/live/LinuxPtraceTask.java
+++ b/frysk-core/frysk/proc/live/LinuxPtraceTask.java
@@ -106,7 +106,7 @@ public class LinuxPtraceTask extends LiveTask {
     public LinuxPtraceTask(LinuxPtraceTask forkingTask,
 			   LinuxPtraceProc proc,
 			   TaskObserver.Attached attached) {
-	super(proc, attached);
+	super(proc);
 	this.creator = forkingTask;
 	((LinuxPtraceHost)proc.getHost()).putTask(tid, this);
 	((LinuxPtraceProc)proc).addTask(this);
diff --git a/frysk-core/frysk/proc/live/LiveTask.java b/frysk-core/frysk/proc/live/LiveTask.java
index b6b31ed..7c4d90f 100644
--- a/frysk-core/frysk/proc/live/LiveTask.java
+++ b/frysk-core/frysk/proc/live/LiveTask.java
@@ -42,7 +42,6 @@ package frysk.proc.live;
 import inua.eio.ByteBuffer;
 import frysk.proc.Task;
 import frysk.proc.Proc;
-import frysk.proc.TaskObserver.Attached;
 import frysk.sys.ProcessIdentifier;
 import frysk.sys.ProcessIdentifierFactory;
 
@@ -71,8 +70,8 @@ abstract class LiveTask extends Task {
     /**
      * New attached child.
      */
-    LiveTask(LiveProc proc, Attached attached) {
-	super(proc, attached);
+    LiveTask(LiveProc proc) {
+	super(proc);
 	tid = ProcessIdentifierFactory.create(proc.getPid());
     }
 


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


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

only message in thread, other threads:[~2008-03-15 20:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-15 20:45 [SCM] master: Delete Proc.creator 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).