[ohm] ohm: Branch 'master' - 3 commits
Rob Taylor
robtaylor at kemper.freedesktop.org
Wed Aug 8 08:23:30 PDT 2007
ohmd/massif-ohm.sh | 18 ------------------
ohmd/ohm-main.c | 4 +++-
ohmd/run-ohm.sh | 13 ++++++++++---
ohmd/valgrind-ohm.sh | 4 ----
4 files changed, 13 insertions(+), 26 deletions(-)
New commits:
diff-tree 1c81985f3f5198649d07573d7501a8ef6bb90ab6 (from fd6a9c0525726aa3a030727e779d8f03a454b72d)
Author: Rob Taylor <rob.taylor at codethink.co.uk>
Date: Wed Aug 8 16:26:08 2007 +0100
try to free up some more memory
Moves g_option_context_free earlier, and calls dbus_shutdown at end. The dbus_shutdown call is not really necessary but lets us know when we're leaking dbus connections. Moving g_option_context_free earlier doesnt help an awful lot as valgrind still reports leaks in the GOptionContext code...
diff --git a/ohmd/ohm-main.c b/ohmd/ohm-main.c
index c166008..fd615bd 100644
--- a/ohmd/ohm-main.c
+++ b/ohmd/ohm-main.c
@@ -136,6 +136,7 @@ main (int argc, char *argv[])
textdomain (GETTEXT_PACKAGE);
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
g_option_context_parse (context, &argc, &argv, &error);
+ g_option_context_free (context);
if (g_fatal_warnings || g_fatal_critical)
{
@@ -189,7 +190,8 @@ main (int argc, char *argv[])
g_object_unref (manager);
dbus_g_connection_unref (connection);
- g_option_context_free (context);
+ /*free memory used by dbus*/
+ dbus_shutdown();
return 0;
}
diff-tree fd6a9c0525726aa3a030727e779d8f03a454b72d (from 5466236a03792c6a8dc1c71f63118194a7a31acb)
Author: Rob Taylor <rob.taylor at codethink.co.uk>
Date: Wed Aug 8 16:22:23 2007 +0100
remove unneeded scripts
Removes massif-ohm.sh and valgrind-ohm.sh as no longer needed.
diff --git a/ohmd/massif-ohm.sh b/ohmd/massif-ohm.sh
deleted file mode 100755
index 903b2ac..0000000
--- a/ohmd/massif-ohm.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-
-rm massif.*
-killall ohmd
-
-valgrind --tool=massif --format=html --depth=10 \
- --alloc-fn=g_malloc --alloc-fn=g_realloc \
- --alloc-fn=g_try_malloc --alloc-fn=g_malloc0 --alloc-fn=g_mem_chunk_alloc \
- ./ohmd --no-daemon --timed-exit
-
-#massif uses the pid file, which is hard to process.
-mv massif.*.html massif.html
-mv massif.*.ps massif.ps
-#convert to pdf, and make readable by normal users
-ps2pdf massif.ps massif.pdf
-rm massif.ps
-rm massif.html
-chmod a+r massif.*
diff --git a/ohmd/valgrind-ohm.sh b/ohmd/valgrind-ohm.sh
deleted file mode 100755
index 3137bf1..0000000
--- a/ohmd/valgrind-ohm.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-#valgrind --num-callers=20 --show-reachable=yes --leak-check=yes --tool=memcheck ./ohmd --no-daemon --timed-exit $@
-valgrind --show-reachable=yes --tool=memcheck --leak-check=full ./ohmd --no-daemon --timed-exit $@
diff-tree 5466236a03792c6a8dc1c71f63118194a7a31acb (from b211852191334c1cb764970bbde09a0fc389bfce)
Author: Rob Taylor <rob.taylor at codethink.co.uk>
Date: Wed Aug 8 16:21:21 2007 +0100
add --time option to run-ohm.sh
Adds a --time option to run-ohm.sh to measure startup time.
diff --git a/ohmd/run-ohm.sh b/ohmd/run-ohm.sh
index abf0385..72f1352 100755
--- a/ohmd/run-ohm.sh
+++ b/ohmd/run-ohm.sh
@@ -10,6 +10,7 @@ if [ "$1" = "--help" ]; then
echo " --skip-plugin-install: Don't do a temporary install of the plugins."
echo " Only use this if $0 has already been run"
echo " without this option"
+ echo " --time: Time OHMd startup"
echo " --debug: Run with gdb"
echo " --memcheck: Run with valgrind memcheck tool"
echo " --massif: Run with valgrind massif heap-profiling tool"
@@ -27,7 +28,13 @@ else
make -C ../plugins install DESTDIR=$OHM_TMPDIR prefix=/
fi
-if [ "$1" = "--debug" ] ; then
+extra='--no-daemon --verbose --g-fatal-critical'
+
+if [ "$1" = "--time" ] ; then
+ shift
+ prefix="time -p"
+ extra="--no-daemon --timed-exit"
+elif [ "$1" = "--debug" ] ; then
shift
prefix="gdb --args"
elif [ "$1" = "--memcheck" ] ; then
@@ -51,5 +58,5 @@ fi
export OHM_CONF_DIR=$OHM_TMPDIR/etc/ohm
export OHM_PLUGIN_DIR=$OHM_TMPDIR/lib/ohm
-echo "Execing: $prefix ./ohmd --no-daemon --verbose --g-fatal-critical $@"
-sudo $prefix ./ohmd --no-daemon --verbose --g-fatal-critical $@
+echo "Execing: $prefix ./ohmd $extra $@"
+sudo $prefix ./ohmd $extra $@
More information about the Ohm-devel
mailing list