Skip to contentSkip to conversation

allow to enable all tracepoints via alias all

PATCH In review Denis V. Lunev 2 participants 4 messages Nov 3, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 allow to enable all tracepoints via alias all

From: Olga Krishtal <[email protected]>

This will produce a lot of noise but could be usefull when we do this for a shot perioud of time on customer side to examine unclear problem.

---
Changes from v1:
- proper mailing list targeted

 trace/control.c | 3 +++
 1 file changed, 3 insertions(+)
trace/control.c +3 -0
index 9a1e381..75085f6 100644
@@ -35,6 +35,9 @@ TraceEvent *trace_event_name(const char *name)
 
 static bool pattern_glob(const char *pat, const char *ev)
 {
+    if (!(g_strcmp0(pat, "all"))) {
+        return true;
+    }
     while (*pat != '\0' && *ev != '\0') {
         if (*pat == *ev) {
             pat++;
Signature · 1 line
2.1.4
#1 lore raw
Quoted 21 lines · Denis V. Lunev

From: Olga Krishtal <[email protected]>

This will produce a lot of noise but could be usefull when we do this for a shot perioud of time on customer side to examine unclear problem.

---
Changes from v1:
- proper mailing list targeted

 trace/control.c | 3 +++
 1 file changed, 3 insertions(+)
trace/control.c +0 -0
index 9a1e381..75085f6 100644

trace/control.c TraceEvent *trace_event_name(const char *name) · line 43

Quoted 9 lines
trace/control.c +3 -0
@@ -35,6 +35,9 @@ TraceEvent *trace_event_name(const char *name)
 
 static bool pattern_glob(const char *pat, const char *ev)
 {
+    if (!(g_strcmp0(pat, "all"))) {
+        return true;
+    }
     while (*pat != '\0' && *ev != '\0') {
         if (*pat == *ev) {
             pat++;

What's wrong with '*'?

#2 lore raw
Quoted 24 lines · Markus Armbruster
Quoted 22 lines · Denis V. Lunev

From: Olga Krishtal <[email protected]>

This will produce a lot of noise but could be usefull when we do this for a shot perioud of time on customer side to examine unclear problem.

---
Changes from v1:
- proper mailing list targeted

  trace/control.c | 3 +++
  1 file changed, 3 insertions(+)
trace/control.c +0 -0
index 9a1e381..75085f6 100644
@@ -35,6 +35,9 @@ TraceEvent *trace_event_name(const char *name)
 
Quoted 9 lines

trace/control.c TraceEvent *trace_event_name(const char *name) · line 43

Quoted 8 lines
trace/control.c +3 -0
  static bool pattern_glob(const char *pat, const char *ev)
  {
+    if (!(g_strcmp0(pat, "all"))) {
+        return true;
+    }
      while (*pat != '\0' && *ev != '\0') {
          if (*pat == *ev) {
              pat++;

What's wrong with '*'?

according to our tests plain '*' is not accepted. It accepts 'bdrv*' or 'qcow2*' but not single '*'. may be we are doing something wrong.

Den

#3 lore raw
In reply to Markus Armbruster
Quoted 24 lines · Markus Armbruster
Quoted 22 lines · Denis V. Lunev

From: Olga Krishtal <[email protected]>

This will produce a lot of noise but could be usefull when we do this for a shot perioud of time on customer side to examine unclear problem.

---
Changes from v1:
- proper mailing list targeted

  trace/control.c | 3 +++
  1 file changed, 3 insertions(+)
trace/control.c +0 -0
index 9a1e381..75085f6 100644
@@ -35,6 +35,9 @@ TraceEvent *trace_event_name(const char *name)
 
Quoted 9 lines

trace/control.c TraceEvent *trace_event_name(const char *name) · line 43

Quoted 8 lines
trace/control.c +3 -0
  static bool pattern_glob(const char *pat, const char *ev)
  {
+    if (!(g_strcmp0(pat, "all"))) {
+        return true;
+    }
      while (*pat != '\0' && *ev != '\0') {
          if (*pat == *ev) {
              pat++;

What's wrong with '*'?

you are right. I have done things wrong. This patch is not needed at all.