[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <725804f4cd0e90ee3f19048e195e0bff08a189a8.1544483273.git.tom.zanussi@linux.intel.com>
Date: Mon, 10 Dec 2018 18:01:31 -0600
From: Tom Zanussi <zanussi@...nel.org>
To: rostedt@...dmis.org
Cc: tglx@...utronix.de, mhiramat@...nel.org, namhyung@...nel.org,
vedang.patel@...el.com, bigeasy@...utronix.de,
joel@...lfernandes.org, mathieu.desnoyers@...icios.com,
julia@...com, linux-kernel@...r.kernel.org,
linux-rt-users@...r.kernel.org
Subject: [PATCH v8 17/22] tracing: Remove unnecessary hist trigger struct fields
From: Tom Zanussi <tom.zanussi@...ux.intel.com>
track_data->var_ref->var_ref_idx can be used instead of
track_data.var_ref_idx, so remove it.
Also, hist_field.var_idx is completely unused, so remove it too.
Signed-off-by: Tom Zanussi <tom.zanussi@...ux.intel.com>
---
kernel/trace/trace_events_hist.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
index 9c19932a5321..130ac2cf6893 100644
--- a/kernel/trace/trace_events_hist.c
+++ b/kernel/trace/trace_events_hist.c
@@ -61,7 +61,6 @@ struct hist_field {
char *system;
char *event_name;
char *name;
- unsigned int var_idx;
unsigned int var_ref_idx;
bool read_once;
};
@@ -419,7 +418,6 @@ struct action_data {
* tracked e.g onmax($var).
*/
struct hist_field *var_ref;
- unsigned int var_ref_idx;
/*
* track_var contains the 'invisible' tracking
@@ -3637,7 +3635,7 @@ static void ontrack_action(struct hist_trigger_data *hist_data,
struct ring_buffer_event *rbe,
struct action_data *data, u64 *var_ref_vals)
{
- u64 var_val = var_ref_vals[data->track_data.var_ref_idx];
+ u64 var_val = var_ref_vals[data->track_data.var_ref->var_ref_idx];
if (check_track_val(elt, data, var_val)) {
save_track_val(hist_data, elt, data, var_val);
@@ -3694,7 +3692,6 @@ static int track_data_create(struct hist_trigger_data *hist_data,
{
struct hist_field *var_field, *ref_field, *track_var = NULL;
struct trace_event_file *file = hist_data->event_file;
- unsigned int var_ref_idx = hist_data->n_var_refs;
char *track_data_var_str;
unsigned long flags;
int ret = 0;
@@ -3726,8 +3723,6 @@ static int track_data_create(struct hist_trigger_data *hist_data,
ref_field->var_ref_idx = hist_data->n_var_refs++;
data->track_data.var_ref = ref_field;
- data->track_data.var_ref_idx = var_ref_idx;
-
if (data->handler == HANDLER_ONMAX)
track_var = create_var(hist_data, file, "__max", sizeof(u64), "u64");
if (IS_ERR(track_var)) {
--
2.14.1
Powered by blists - more mailing lists