[PATCH v1 06/10] tools, perf, script: Set user_set/wildcard_set for +- fields in -F
From: Andi Kleen
Date: Wed Aug 29 2018 - 13:19:03 EST
- Next message: Andi Kleen: "[PATCH v1 08/10] perf, tools, script: Make itrace script default to all calls"
- Previous message: Andi Kleen: "[PATCH v1 04/10] perf, tools, script: Allow sym and dso without ip, addr"
- In reply to: Jiri Olsa: "Re: [PATCH v1 04/10] perf, tools, script: Allow sym and dso without ip, addr"
- Next in thread: Jiri Olsa: "Re: [PATCH v1 06/10] tools, perf, script: Set user_set/wildcard_set for +- fields in -F"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: Andi Kleen <ak@xxxxxxxxxxxxxxx>
The branch target output relies on the user_set flag to determine
if the branch target should be implicitely printed. When
modifying the fields with + or - also set user_set,
so that ADDR can be removed. We also need to set wildcard_set
to make the initial sanity check pass.
Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>
---
tools/perf/builtin-script.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 6a470dd8f2d0..14b19ff43cbd 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -2497,6 +2497,8 @@ static int parse_output_fields(const struct option *opt __maybe_unused,
output[j].fields &= ~all_output_options[i].field;
else
output[j].fields |= all_output_options[i].field;
+ output[j].user_set = true;
+ output[j].wildcard_set = true;
}
}
} else {
@@ -2507,7 +2509,8 @@ static int parse_output_fields(const struct option *opt __maybe_unused,
rc = -EINVAL;
goto out;
}
- output[type].fields |= all_output_options[i].field;
+ output[j].user_set = true;
+ output[j].wildcard_set = true;
}
}
--
2.17.1
- Next message: Andi Kleen: "[PATCH v1 08/10] perf, tools, script: Make itrace script default to all calls"
- Previous message: Andi Kleen: "[PATCH v1 04/10] perf, tools, script: Allow sym and dso without ip, addr"
- In reply to: Jiri Olsa: "Re: [PATCH v1 04/10] perf, tools, script: Allow sym and dso without ip, addr"
- Next in thread: Jiri Olsa: "Re: [PATCH v1 06/10] tools, perf, script: Set user_set/wildcard_set for +- fields in -F"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]