[4/4] trace: [simple] always enable trace points

Message ID 20110327194333.622.76752.stgit@ginnungagap.bsc.es
State New
Headers show

Commit Message

=?utf-8?Q?Llu=C3=ADs?= March 27, 2011, 7:43 p.m.
Signed-off-by: LluĂ­s Vilanova <vilanova@ac.upc.edu>
 scripts/tracetool |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)


=?utf-8?Q?Llu=C3=ADs?= March 28, 2011, 12:39 p.m. | #1
Last time there was discussion on disabling all tracee points in simple
by default, but providing an argument for a list of trace point to
enable at startup.

Instead, what I've done is enabling all trace points in simple by

Given that "disable" will effectively disable all points, including the
dtrace backend, my question is what is preferred:

* leave it as it is in this patch
  * leave all points as disabled, so the user has to remove the
    "disable" regardless of the backend
  * simple acts as stderr, all non-disabled points will generate output

* remove the "disable" on all events
  * for any backend with trace point "states" leave the state as
    disabled by default (dynamically enabling them is a backendspecific
    operation, when supported)
  * this means implementing the event list argument for the simple
    backend in order to easily enable a set of events at program startup


 "And it's much the same thing with knowledge, for whenever you learn
 something new, the whole world becomes that much richer."
 -- The Princess of Pure Reason, as told by Norton Juster in The Phantom


diff --git a/scripts/tracetool b/scripts/tracetool
index 7506776..b355ac5 100755
--- a/scripts/tracetool
+++ b/scripts/tracetool
@@ -221,15 +221,10 @@  EOF
-    local name state
+    local name
     name=$(get_name "$1")
-    if has_property "$1" "disable"; then
-        state="0"
-    else
-        state="1"
-    fi
     cat <<EOF
-{.tp_name = "$name", .state=$state},
+{.tp_name = "$name", .state=1},
     simple_event_num=$((simple_event_num + 1))