public inbox for frysk-cvs@sourceware.org help / color / mirror / Atom feed
From: cagney@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Delete observableTask{Added,Removed}XXX. Date: Wed, 12 Mar 2008 22:02:00 -0000 [thread overview] Message-ID: <20080312220244.15364.qmail@sourceware.org> (raw) The branch, master has been updated via 8901497a27c497b0781b8431ac773b73ef6eeeec (commit) from 86f26a3065aed78972abaec90cc0a22f8dc5101a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 8901497a27c497b0781b8431ac773b73ef6eeeec Author: Andrew Cagney <cagney@redhat.com> Date: Wed Mar 12 18:00:55 2008 -0400 Delete observableTask{Added,Removed}XXX. frysk-core/frysk/proc/ChangeLog 2008-03-12 Andrew Cagney <cagney@redhat.com> * Host.java (observableTaskRemovedXXX): Delete. (observableTaskAddedXXX): Delete. * Proc.java: Update. frysk-core/frysk/testbed/ChangeLog 2008-03-12 Andrew Cagney <cagney@redhat.com> * TaskCounter.java: Delete. ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/proc/ChangeLog | 4 + frysk-core/frysk/proc/Host.java | 18 ----- frysk-core/frysk/proc/Proc.java | 2 - frysk-core/frysk/testbed/ChangeLog | 2 + frysk-core/frysk/testbed/TaskCounter.java | 105 ----------------------------- 5 files changed, 6 insertions(+), 125 deletions(-) delete mode 100644 frysk-core/frysk/testbed/TaskCounter.java First 500 lines of diff: diff --git a/frysk-core/frysk/proc/ChangeLog b/frysk-core/frysk/proc/ChangeLog index a82541a..f3ef4ee 100644 --- a/frysk-core/frysk/proc/ChangeLog +++ b/frysk-core/frysk/proc/ChangeLog @@ -1,5 +1,9 @@ 2008-03-12 Andrew Cagney <cagney@redhat.com> + * Host.java (observableTaskRemovedXXX): Delete. + (observableTaskAddedXXX): Delete. + * Proc.java: Update. + * Host.java (observableProcAddedXXX): Delete. * TestTaskObserverInstruction.java diff --git a/frysk-core/frysk/proc/Host.java b/frysk-core/frysk/proc/Host.java index 39fec06..ee54225 100644 --- a/frysk-core/frysk/proc/Host.java +++ b/frysk-core/frysk/proc/Host.java @@ -181,24 +181,6 @@ public abstract class Host implements Comparable { public ObservableXXX observableProcRemovedXXX = new ObservableXXX(); /** - * Notify of the addition of a task attached to this process. - * - * This event indicates the presence of the task, not that it is - * attached or detached. - * - * XXX: Should be made private and instead accessor methods added. - * Should more formally define the observable and the event. - */ - public ObservableXXX observableTaskAddedXXX = new ObservableXXX(); - /** - * Notify of the removal of a task attached to this process. - * - * XXX: Should be made private and instead accessor methods added. - * Should more formally define the observable and the event. - */ - public ObservableXXX observableTaskRemovedXXX = new ObservableXXX(); - - /** * Return the process corresponding to this running frysk instance * found on this host. */ diff --git a/frysk-core/frysk/proc/Proc.java b/frysk-core/frysk/proc/Proc.java index 4eb1171..e82b553 100644 --- a/frysk-core/frysk/proc/Proc.java +++ b/frysk-core/frysk/proc/Proc.java @@ -330,7 +330,6 @@ public abstract class Proc implements Comparable { */ void add(Task task) { taskPool.put(task.getTaskId(), task); - host.observableTaskAddedXXX.notify(task); } /** @@ -338,7 +337,6 @@ public abstract class Proc implements Comparable { */ protected void remove(Task task) { fine.log(this, "remove(Task) -- within this Proc"); - host.observableTaskRemovedXXX.notify(task); taskPool.remove(task.getTaskId()); host.remove(task); } diff --git a/frysk-core/frysk/testbed/ChangeLog b/frysk-core/frysk/testbed/ChangeLog index 5d4f39f..0e284b3 100644 --- a/frysk-core/frysk/testbed/ChangeLog +++ b/frysk-core/frysk/testbed/ChangeLog @@ -1,5 +1,7 @@ 2008-03-12 Andrew Cagney <cagney@redhat.com> + * TaskCounter.java: Delete. + * SignalWaiter.java (assertRunUntilSignal()): Include message in assert. diff --git a/frysk-core/frysk/testbed/TaskCounter.java b/frysk-core/frysk/testbed/TaskCounter.java deleted file mode 100644 index 526f84e..0000000 --- a/frysk-core/frysk/testbed/TaskCounter.java +++ /dev/null @@ -1,105 +0,0 @@ -// This file is part of the program FRYSK. -// -// Copyright 2005, 2006, 2007, 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.testbed; - -import java.util.List; -import java.util.LinkedList; -import java.util.Observer; -import java.util.Observable; -import frysk.proc.Task; -import frysk.proc.Manager; - -/** - * Observer that counts the number of tasks <em>frysk</em> reports - * as added and removed to the system.. This automatically wires - * itself in using the Proc's procAdded observer. - */ - -public class TaskCounter { - /** - * List of tasks added. - */ - public final List added = new LinkedList(); - - /** - * List of tasks removed. - */ - public final List removed = new LinkedList(); - - /** - * Only count descendants of this process? - */ - private boolean descendantsOnly; - - /** - * Create a task counter that monitors task added and removed - * events. If descendantsOnly, limit the count to tasks - * belonging to descendant processes. - */ - public TaskCounter (boolean descendantsOnly) { - this.descendantsOnly = descendantsOnly; - Manager.host.observableTaskAddedXXX.addObserver(new Observer() { - public void update (Observable o, Object obj) { - Task task = (Task) obj; - if (TaskCounter.this.descendantsOnly - && ! TestLib.isDescendantOfMine(task.getProc())) - return; - added.add(task); - } - }); - Manager.host.observableTaskRemovedXXX.addObserver(new Observer() { - public void update (Observable o, Object obj) { - Task task = (Task) obj; - if (TaskCounter.this.descendantsOnly - && ! TestLib.isDescendantOfMine(task.getProc())) - return; - removed.add(task); - } - }); - } - - /** - * Create a task counter that counts all task add and removed - * events. - */ - public TaskCounter () { - this(false); - } -} hooks/post-receive -- frysk system monitor/debugger
reply other threads:[~2008-03-12 22:02 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20080312220244.15364.qmail@sourceware.org \ --to=cagney@sourceware.org \ --cc=frysk-cvs@sourceware.org \ --cc=frysk@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).