This is the mail archive of the frysk-cvs@sources.redhat.com mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[SCM] master: Delete ProcId.


The branch, master has been updated
       via  61fd2dad20bc97f51520127afbc3f9dc9de3b28a (commit)
      from  a2762d9fc264df8287bfa9830b1148b4e4143970 (commit)

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

- Log -----------------------------------------------------------------
commit 61fd2dad20bc97f51520127afbc3f9dc9de3b28a
Author: Andrew Cagney <cagney@redhat.com>
Date:   Tue Feb 26 18:30:54 2008 -0500

    Delete ProcId.
    
    frysk-core/frysk/proc/ChangeLog
    2008-02-26  Andrew Cagney  <cagney@redhat.com>
    
    	* ProcId.java: Delete.
    	* TestId.java: Delete.
    	* Proc.java (getId()): Delete.
    	(id): Delete.
    
    frysk-core/frysk/proc/dead/ChangeLog
    2008-02-26  Andrew Cagney  <cagney@redhat.com>
    
    	* TestLinuxCore.java: Update to match Proc.
    
    frysk-gui/frysk/gui/monitor/ChangeLog
    2008-02-26  Andrew Cagney  <cagney@redhat.com>
    
    	* ProcWiseDataModel.java: Use proc, not ProcId as key.

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

Summary of changes:
 frysk-core/frysk/proc/ChangeLog                    |    5 +
 frysk-core/frysk/proc/Proc.java                    |    7 --
 frysk-core/frysk/proc/ProcId.java                  |   77 -----------------
 frysk-core/frysk/proc/TestId.java                  |   89 --------------------
 frysk-core/frysk/proc/dead/ChangeLog               |    2 +
 frysk-core/frysk/proc/dead/TestLinuxCore.java      |    1 -
 frysk-gui/frysk/gui/monitor/ChangeLog              |    4 +
 frysk-gui/frysk/gui/monitor/ProcWiseDataModel.java |   14 ++--
 8 files changed, 17 insertions(+), 182 deletions(-)
 delete mode 100644 frysk-core/frysk/proc/ProcId.java
 delete mode 100644 frysk-core/frysk/proc/TestId.java

First 500 lines of diff:
diff --git a/frysk-core/frysk/proc/ChangeLog b/frysk-core/frysk/proc/ChangeLog
index 5341302..625155c 100644
--- a/frysk-core/frysk/proc/ChangeLog
+++ b/frysk-core/frysk/proc/ChangeLog
@@ -1,5 +1,10 @@
 2008-02-26  Andrew Cagney  <cagney@redhat.com>
 
+	* ProcId.java: Delete.
+	* TestId.java: Delete.
+	* Proc.java (getId()): Delete.
+	(id): Delete.
+	
 	* Proc.java (Proc): Do not call Host.add(Proc).
 	* Host.java (procPool): Delete.
 	(add(Proc)): Delete.
diff --git a/frysk-core/frysk/proc/Proc.java b/frysk-core/frysk/proc/Proc.java
index bfa2cfd..5c8c081 100644
--- a/frysk-core/frysk/proc/Proc.java
+++ b/frysk-core/frysk/proc/Proc.java
@@ -63,14 +63,8 @@ import frysk.sys.Signal;
 public abstract class Proc implements Comparable {
     protected static final Logger logger = Logger.getLogger(ProcLogger.LOGGER_ID);
 
-    final ProcId id;
-  
     private CountDownLatch quitLatch;
   
-    public ProcId getId() {
-	return id;
-    }
-
     /**
      * If known, due to the tracing of a fork, the Task that created
      * this process.
@@ -152,7 +146,6 @@ public abstract class Proc implements Comparable {
     private Proc(int pid, Proc parent, Host host, Task creator) {
 	this.host = host;
 	this.pid = pid;
-	this.id = new ProcId(pid);
 	this.parent = parent;
 	this.creator = creator;
 	// Keep parent informed.
diff --git a/frysk-core/frysk/proc/ProcId.java b/frysk-core/frysk/proc/ProcId.java
deleted file mode 100644
index ec73bad..0000000
--- a/frysk-core/frysk/proc/ProcId.java
+++ /dev/null
@@ -1,77 +0,0 @@
-// This file is part of the program FRYSK.
-//
-// Copyright 2005, 2006, Red Hat Inc.
-//
-// FRYSK is free software; you can redistribute it and/or modify it
-// under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// FRYSK is distributed in the hope that it will be useful, but
-// WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with FRYSK; if not, write to the Free Software Foundation,
-// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-// 
-// In addition, as a special exception, Red Hat, Inc. gives You the
-// additional right to link the code of FRYSK with code not covered
-// under the GNU General Public License ("Non-GPL Code") and to
-// distribute linked combinations including the two, subject to the
-// limitations in this paragraph. Non-GPL Code permitted under this
-// exception must only link to the code of FRYSK through those well
-// defined interfaces identified in the file named EXCEPTION found in
-// the source code files (the "Approved Interfaces"). The files of
-// Non-GPL Code may instantiate templates or use macros or inline
-// functions from the Approved Interfaces without causing the
-// resulting work to be covered by the GNU General Public
-// License. Only Red Hat, Inc. may make changes or additions to the
-// list of Approved Interfaces. You must obey the GNU General Public
-// License in all respects for all of the FRYSK code and other code
-// used in conjunction with FRYSK except the Non-GPL Code covered by
-// this exception. If you modify this file, you may extend this
-// exception to your version of the file, but you are not obligated to
-// do so. If you do not wish to provide this exception without
-// modification, you must delete this exception statement from your
-// version and license this file solely under the GPL without
-// exception.
-
-package frysk.proc;
-
-/**
- * Light weight identifier for a process.
- *
- * This implements comparable so can be used for searching and the
- * like.  Anything wanting to search for a process should use this.
- */
-
-public class ProcId
-    extends Id
-{
-    ProcId ()
-    {
-	super ();
-    }
-    public ProcId (int id)
-    {
-	super (id);
-    }
-    public String toString ()
-    {
-	return ("{ProcId," + super.toString () + "}");
-    }
-    protected boolean isCompatible (Object o)
-    {
-	return (o instanceof ProcId);
-    }
-    
-    /**
-     * Get the PID of this ProcessID.
-     * @return the pid
-     */
-    public int intValue()
-    {
-      return id; // field in superclass
-    }
-}
diff --git a/frysk-core/frysk/proc/TestId.java b/frysk-core/frysk/proc/TestId.java
deleted file mode 100644
index 8a8e926..0000000
--- a/frysk-core/frysk/proc/TestId.java
+++ /dev/null
@@ -1,89 +0,0 @@
-// This file is part of the program FRYSK.
-//
-// Copyright 2005, 2006, Red Hat Inc.
-//
-// FRYSK is free software; you can redistribute it and/or modify it
-// under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// FRYSK is distributed in the hope that it will be useful, but
-// WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with FRYSK; if not, write to the Free Software Foundation,
-// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-// 
-// In addition, as a special exception, Red Hat, Inc. gives You the
-// additional right to link the code of FRYSK with code not covered
-// under the GNU General Public License ("Non-GPL Code") and to
-// distribute linked combinations including the two, subject to the
-// limitations in this paragraph. Non-GPL Code permitted under this
-// exception must only link to the code of FRYSK through those well
-// defined interfaces identified in the file named EXCEPTION found in
-// the source code files (the "Approved Interfaces"). The files of
-// Non-GPL Code may instantiate templates or use macros or inline
-// functions from the Approved Interfaces without causing the
-// resulting work to be covered by the GNU General Public
-// License. Only Red Hat, Inc. may make changes or additions to the
-// list of Approved Interfaces. You must obey the GNU General Public
-// License in all respects for all of the FRYSK code and other code
-// used in conjunction with FRYSK except the Non-GPL Code covered by
-// this exception. If you modify this file, you may extend this
-// exception to your version of the file, but you are not obligated to
-// do so. If you do not wish to provide this exception without
-// modification, you must delete this exception statement from your
-// version and license this file solely under the GPL without
-// exception.
-
-package frysk.proc;
-
-import frysk.junit.TestCase;
-
-/**
- * Test that Id compares actually work as expected.
- */
-
-public class TestId
-    extends TestCase
-{
-    Id id1 = new Id (1);
-    Id id2 = new Id (2);
-    Id id3 = new Id (3);
-    TaskId tid1 = new TaskId (1);
-    TaskId tid2 = new TaskId (2);
-    ProcId pid1 = new ProcId (1);
-    ProcId pid2 = new ProcId (2);
-    /**
-     * Equals with base class works.
-     */
-    public void testIdEquals ()
-    {
-	assertTrue ("id1.equals (id1)", id1.equals (id1));
-	assertFalse ("id1.equals (id2)", id1.equals (id2));
-    }
-    
-    public void testIdCompareTo ()
-    {
-	assertTrue ("id2.compareTo (id1)", id2.compareTo (id1) < 0);
-	assertTrue ("id2.compareTo (id2)", id2.compareTo (id2) == 0);
-	assertTrue ("id2.compareTo (id3)", id2.compareTo (id3) > 0);
-    }
-
-    public void testTaskId ()
-    {
-	// An Id works with anything?
-	assertTrue ("tid1.equals (tid1)", tid1.equals (tid1));
-	assertFalse ("tid1.equals (tid2)", tid1.equals (tid2));
-	assertFalse ("tid1.equals (pid2)", tid1.equals (pid2));
-	assertFalse ("tid1.equals (pid1)", tid1.equals (pid1));
-    }
-    public void testProcId ()
-    {
-	assertTrue ("pid1.equals (pid1)", pid1.equals (pid1));
-	assertFalse ("pid1.equals (pid2)", pid1.equals (pid2));
-	assertFalse ("pid1.equals (tid1)", pid1.equals (tid1));
-	assertFalse ("pid1.equals (tid2)", pid1.equals (tid2));
-    }
-}
diff --git a/frysk-core/frysk/proc/dead/ChangeLog b/frysk-core/frysk/proc/dead/ChangeLog
index 0498f3e..f7d188f 100644
--- a/frysk-core/frysk/proc/dead/ChangeLog
+++ b/frysk-core/frysk/proc/dead/ChangeLog
@@ -1,5 +1,7 @@
 2008-02-26  Andrew Cagney  <cagney@redhat.com>
 
+	* TestLinuxCore.java: Update to match Proc.
+
 	* TestLinuxExe.java (testRequestProc()): New.
 	(testRequestProc()): New.
 	* DeadHost.java (getProc()): New; abstract.
diff --git a/frysk-core/frysk/proc/dead/TestLinuxCore.java b/frysk-core/frysk/proc/dead/TestLinuxCore.java
index 2860a80..634a592 100644
--- a/frysk-core/frysk/proc/dead/TestLinuxCore.java
+++ b/frysk-core/frysk/proc/dead/TestLinuxCore.java
@@ -215,7 +215,6 @@ public class TestLinuxCore extends TestLib {
     public void testLinuxProcPopulation() {
 	assertNotNull("Proc exists in corefile", coreProc);
 	assertEquals("PID", 26799, coreProc.getPid());
-	assertEquals("ProcID", 26799, coreProc.getId().id);
 	assertEquals("getParent", null, coreProc.getParent());
 	assertEquals("getCommand", "segfault", coreProc.getCommand());
 	assertEquals("getExe", "/home/pmuldoon/segfault", coreProc.getExe());
diff --git a/frysk-gui/frysk/gui/monitor/ChangeLog b/frysk-gui/frysk/gui/monitor/ChangeLog
index 65919d1..6957086 100644
--- a/frysk-gui/frysk/gui/monitor/ChangeLog
+++ b/frysk-gui/frysk/gui/monitor/ChangeLog
@@ -1,3 +1,7 @@
+2008-02-26  Andrew Cagney  <cagney@redhat.com>
+
+	* ProcWiseDataModel.java: Use proc, not ProcId as key.
+
 2008-02-13  Andrew Cagney  <cagney@redhat.com>
 
 	* ProcWiseDataModel.java: Update to match Scan.
diff --git a/frysk-gui/frysk/gui/monitor/ProcWiseDataModel.java b/frysk-gui/frysk/gui/monitor/ProcWiseDataModel.java
index dee2016..980445b 100644
--- a/frysk-gui/frysk/gui/monitor/ProcWiseDataModel.java
+++ b/frysk-gui/frysk/gui/monitor/ProcWiseDataModel.java
@@ -308,14 +308,14 @@ public class ProcWiseDataModel
           if (!guiProc.isOwned())
             return;
           
-          TreeIter parent = (TreeIter) iterMap.get(proc.getId());
+          TreeIter parent = (TreeIter) iterMap.get(proc);
 
           if (parent == null)
             {
               // new process name
               parent = treeStore.appendRow(null);
               if (parent != null)
-                iterMap.put(proc.getId(), parent);
+                iterMap.put(proc, parent);
             }
           
               treeStore.setValue(parent, nameDC, guiProc.getExecutableName());
@@ -357,11 +357,9 @@ public class ProcWiseDataModel
         {
           TreeIter parent = null;
 
-          if (proc != null)
-            {
-              try
-                {
-                  parent = (TreeIter) iterMap.get(proc.getId());
+          if (proc != null) {
+              try {
+		    parent = (TreeIter) iterMap.get(proc);
                 }
               catch (Exception e)
                 {
@@ -397,7 +395,7 @@ public class ProcWiseDataModel
             }
 
           treeStore.removeRow(parent);
-          iterMap.remove(proc.getId());
+          iterMap.remove(proc);
 
           return;
         }


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]