Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1737803
| From | Tom Zanussi <tom.zanussi@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 7/9] tracing: Clean up hist_field_flags enum |
| Date | 2017-09-22 22:10 +0200 |
| Message-ID | <usCqT-21j-25@gated-at.bofh.it> (permalink) |
| References | <usChc-1IF-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
As we add more flags, specifying explicit integers for the flag values
becomes more unwieldy and error-prone - switch them over to left-shift
values.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
---
kernel/trace/trace_events_hist.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
index 7eb975a..4f6b640 100644
--- a/kernel/trace/trace_events_hist.c
+++ b/kernel/trace/trace_events_hist.c
@@ -110,16 +110,16 @@ static u64 hist_field_log2(struct hist_field *hist_field, void *event)
#define HIST_KEY_SIZE_MAX (MAX_FILTER_STR_VAL + HIST_STACKTRACE_SIZE)
enum hist_field_flags {
- HIST_FIELD_FL_HITCOUNT = 1,
- HIST_FIELD_FL_KEY = 2,
- HIST_FIELD_FL_STRING = 4,
- HIST_FIELD_FL_HEX = 8,
- HIST_FIELD_FL_SYM = 16,
- HIST_FIELD_FL_SYM_OFFSET = 32,
- HIST_FIELD_FL_EXECNAME = 64,
- HIST_FIELD_FL_SYSCALL = 128,
- HIST_FIELD_FL_STACKTRACE = 256,
- HIST_FIELD_FL_LOG2 = 512,
+ HIST_FIELD_FL_HITCOUNT = 1 << 0,
+ HIST_FIELD_FL_KEY = 1 << 1,
+ HIST_FIELD_FL_STRING = 1 << 2,
+ HIST_FIELD_FL_HEX = 1 << 3,
+ HIST_FIELD_FL_SYM = 1 << 4,
+ HIST_FIELD_FL_SYM_OFFSET = 1 << 5,
+ HIST_FIELD_FL_EXECNAME = 1 << 6,
+ HIST_FIELD_FL_SYSCALL = 1 << 7,
+ HIST_FIELD_FL_STACKTRACE = 1 << 8,
+ HIST_FIELD_FL_LOG2 = 1 << 9,
};
struct hist_trigger_attrs {
--
1.9.3
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/9] tracing: Bug fixes and minor cleanup Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-09-22 22:00 +0200 [PATCH 5/9] tracing: Increase tracing map KEYS_MAX size Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-09-22 22:00 +0200 [PATCH 3/9] tracing: Exclude 'generic fields' from histograms Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-09-22 22:00 +0200 [PATCH 1/9] tracing: Steve's unofficial trace_recursive_lock() patch Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-09-22 22:00 +0200 [PATCH 4/9] tracing: Remove lookups from tracing_map hitcount Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-09-22 22:00 +0200 [PATCH 9/9] tracing: Reimplement log2 Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-09-22 22:10 +0200 [PATCH 7/9] tracing: Clean up hist_field_flags enum Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-09-22 22:10 +0200 [PATCH 8/9] tracing: Add hist_field_name() accessor Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-09-22 22:10 +0200 [PATCH 2/9] tracing: Reverse the order of trace_types_lock and event_mutex Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-09-22 22:20 +0200
csiph-web