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

The branch, master has been updated
       via  3643b66d9a569802481310b2d76ed78412a306af (commit)
      from  41417f3ab9ce44f1f77024b3da0f91a61967a049 (commit)

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

- Log -----------------------------------------------------------------
commit 3643b66d9a569802481310b2d76ed78412a306af
Author: Andrew Cagney <cagney@redhat.com>
Date:   Thu Feb 28 14:55:29 2008 -0500

    frysk-core/frysk/dwfl/ChangeLog
    2008-02-28  Andrew Cagney  <cagney@redhat.com>
    
    	* DwflCache.java: Use frysk.rsl.
    	* DwflFactory.java: Ditto.
    
     b/frysk-sys/frysk/rsl/ChangeLog
    
     	* Log.java: Add more loggers.

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

Summary of changes:
 frysk-core/frysk/dwfl/ChangeLog        |    5 +++++
 frysk-core/frysk/dwfl/DwflCache.java   |   20 +++++++++-----------
 frysk-core/frysk/dwfl/DwflFactory.java |   21 ++++++++++-----------
 frysk-sys/frysk/rsl/ChangeLog          |    2 ++
 frysk-sys/frysk/rsl/Log.java           |    5 +++++
 5 files changed, 31 insertions(+), 22 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/dwfl/ChangeLog b/frysk-core/frysk/dwfl/ChangeLog
index 00725db..21787a1 100644
--- a/frysk-core/frysk/dwfl/ChangeLog
+++ b/frysk-core/frysk/dwfl/ChangeLog
@@ -1,3 +1,8 @@
+2008-02-28  Andrew Cagney  <cagney@redhat.com>
+
+	* DwflCache.java: Use frysk.rsl.
+	* DwflFactory.java: Ditto.
+
 2008-02-05  Stan Cox  <scox@redhat.com>
 
 	* DwflCache.java (getRelativeSysRoot): Use getCanonicalPath.
diff --git a/frysk-core/frysk/dwfl/DwflCache.java b/frysk-core/frysk/dwfl/DwflCache.java
index 8a28320..c440cd0 100644
--- a/frysk-core/frysk/dwfl/DwflCache.java
+++ b/frysk-core/frysk/dwfl/DwflCache.java
@@ -1,6 +1,6 @@
 // This file is part of the program FRYSK.
 //
-// Copyright 2007, Red Hat Inc.
+// Copyright 2007, 2008, 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
@@ -40,13 +40,11 @@
 package frysk.dwfl;
 
 import frysk.proc.Task;
-
 import java.io.File;
 import java.io.IOException;
 import java.util.Iterator;
 import java.util.WeakHashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import frysk.rsl.Log;
 import lib.dwfl.Dwfl;
 
 /**
@@ -55,9 +53,9 @@ import lib.dwfl.Dwfl;
  * If a process changes, and the Dwfl needs to be updated, this class
  * will re-open the dwfl returning a new object.
  */
-public class DwflCache
-{
-    private static Logger logger = Logger.getLogger("frysk");
+
+public class DwflCache {
+    private static final Log fine = Log.fine(DwflCache.class);
 
     static private class Mod {
 	final Dwfl dwfl;
@@ -133,11 +131,11 @@ public class DwflCache
      * @return a Dwfl created using the tasks maps.
      */
     public static Dwfl getDwfl(Task task) {
-	logger.log(Level.FINE, "entering createDwfl, task: {0}\n", task);
+	fine.log("entering createDwfl, task", task);
 
 	// If there is no dwfl for this task create one.
 	if (!modMap.containsKey(task)) {
-	    logger.log(Level.FINEST, "creating new dwfl for task {0}\n", task);
+	    fine.log("creating new dwfl for task", task);
 	    String sysroot = (String)sysrootMap.get(task.getProc().getCommand());
 	    if (sysroot == null)
 		sysroot = "/";
@@ -157,12 +155,12 @@ public class DwflCache
 
 	// If a dwfl doesn't match the Tasks mod count, update it.
 	if (mod.count != task.getMod()) {
-	    logger.log(Level.FINEST, "existing dwfl out-of-date\n");
+	    fine.log("existing dwfl out-of-date");
 	    DwflFactory.updateDwfl(mod.dwfl, task);
 	    mod.count = task.getMod();
 	}
 
-	logger.log(Level.FINER, "returning existing dwfl {0}\n", mod.dwfl);
+	fine.log("returning existing dwfl", mod.dwfl);
 	return mod.dwfl;
     }
 
diff --git a/frysk-core/frysk/dwfl/DwflFactory.java b/frysk-core/frysk/dwfl/DwflFactory.java
index 8721e2b..e6b9666 100644
--- a/frysk-core/frysk/dwfl/DwflFactory.java
+++ b/frysk-core/frysk/dwfl/DwflFactory.java
@@ -1,6 +1,6 @@
 // This file is part of the program FRYSK.
 //
-// Copyright 2007, Red Hat Inc.
+// Copyright 2007, 2008, 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
@@ -43,17 +43,16 @@ import frysk.proc.Auxv;
 import frysk.proc.MemoryMap;
 import frysk.proc.Proc;
 import frysk.proc.Task;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import frysk.rsl.Log;
 import lib.dwfl.Dwfl;
 import lib.dwfl.DwflModule;
 
 /**
  * Factory for creating Dwfl objects for Procs and Tasks.
  */
-public class DwflFactory
-{
-    private static Logger logger = Logger.getLogger("frysk");
+
+public class DwflFactory {
+    private static final Log fine = Log.fine(DwflFactory.class);
 
     /**
      * Check whether a given {@link frysk.proc.MemoryMap} from a
@@ -86,7 +85,7 @@ public class DwflFactory
 		}
 	    }
 	}
-	logger.log(Level.FINE, "Couldn't get vdso address\n");
+	fine.log("Couldn't get vdso address");
 	return 0;
     }
 
@@ -133,7 +132,7 @@ public class DwflFactory
 
 	// If map represents the vdso section, report vdso.
 	if (isVDSO(proc, maps[count])) {
-	    logger.log(Level.FINE, "Found the vdso!\n");
+	    fine.log("Found the vdso!");
 	    dwfl.dwfl_report_module(maps[count].name, maps[count].addressLow,
 				    maps[count].addressHigh);
 	} else {
@@ -194,9 +193,9 @@ public class DwflFactory
 	dwfl.dwfl_report_end();
 	DwflModule module = dwfl.getModule(VDSOAddressLow(proc));
 
-	logger.log(Level.FINE, "Main task {0}", proc.getMainTask());
-	logger.log(Level.FINE, "Memory {0}", proc.getMainTask().getMemory());
-	logger.log(Level.FINE, "Dwfl module: {0}\n", module);
+	fine.log("updateDwfl main task", proc.getMainTask(),
+		 "memory", proc.getMainTask().getMemory(),
+		 "dwfl module", module);
 	// XXX: Should this method instead have this block of memory
 	// pre-fetched and passed in?
 	if (module != null) {
diff --git a/frysk-sys/frysk/rsl/ChangeLog b/frysk-sys/frysk/rsl/ChangeLog
index 4ab7abe..3a61a8b 100644
--- a/frysk-sys/frysk/rsl/ChangeLog
+++ b/frysk-sys/frysk/rsl/ChangeLog
@@ -2,6 +2,8 @@
 
 	* Log.java: Add more loggers.
 
+	* Log.java: Add more loggers.
+
 2008-02-26  Andrew Cagney  <cagney@redhat.com>
 
 	* Log.java (dump(Throwable)): Use toString(), not getMessage();
diff --git a/frysk-sys/frysk/rsl/Log.java b/frysk-sys/frysk/rsl/Log.java
index 0e4849e..05643a2 100644
--- a/frysk-sys/frysk/rsl/Log.java
+++ b/frysk-sys/frysk/rsl/Log.java
@@ -449,6 +449,11 @@ public final class Log {
 	    return;
 	prefix().print(p1).print(p2).print(p3).print(p4).print(p5).print(p6).suffix();
     }
+    public void log(String p1, Object p2, String p3, Object p4, String p5, Object p6) {
+	if (!logging)
+	    return;
+	prefix().print(p1).print(p2).print(p3).print(p4).print(p5).print(p6).suffix();
+    }
 
     // static 8 parameters
     public void log(String p1, int p2, String p3, Object p4, String p5, Object p6, String p7, int p8) {


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


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

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

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-28 19:56 [SCM] master: frysk-core/frysk/dwfl/ChangeLog 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).