diff options
Diffstat (limited to 'kernel/trace/trace_events_hist.c')
-rw-r--r-- | kernel/trace/trace_events_hist.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c index ca46339f3009..a1d20421f4b0 100644 --- a/kernel/trace/trace_events_hist.c +++ b/kernel/trace/trace_events_hist.c | |||
@@ -3713,7 +3713,6 @@ static void track_data_destroy(struct hist_trigger_data *hist_data, | |||
3713 | struct trace_event_file *file = hist_data->event_file; | 3713 | struct trace_event_file *file = hist_data->event_file; |
3714 | 3714 | ||
3715 | destroy_hist_field(data->track_data.track_var, 0); | 3715 | destroy_hist_field(data->track_data.track_var, 0); |
3716 | destroy_hist_field(data->track_data.var_ref, 0); | ||
3717 | 3716 | ||
3718 | if (data->action == ACTION_SNAPSHOT) { | 3717 | if (data->action == ACTION_SNAPSHOT) { |
3719 | struct track_data *track_data; | 3718 | struct track_data *track_data; |
@@ -5187,7 +5186,6 @@ static void event_hist_trigger(struct event_trigger_data *data, void *rec, | |||
5187 | u64 var_ref_vals[TRACING_MAP_VARS_MAX]; | 5186 | u64 var_ref_vals[TRACING_MAP_VARS_MAX]; |
5188 | char compound_key[HIST_KEY_SIZE_MAX]; | 5187 | char compound_key[HIST_KEY_SIZE_MAX]; |
5189 | struct tracing_map_elt *elt = NULL; | 5188 | struct tracing_map_elt *elt = NULL; |
5190 | struct stack_trace stacktrace; | ||
5191 | struct hist_field *key_field; | 5189 | struct hist_field *key_field; |
5192 | u64 field_contents; | 5190 | u64 field_contents; |
5193 | void *key = NULL; | 5191 | void *key = NULL; |
@@ -5199,14 +5197,9 @@ static void event_hist_trigger(struct event_trigger_data *data, void *rec, | |||
5199 | key_field = hist_data->fields[i]; | 5197 | key_field = hist_data->fields[i]; |
5200 | 5198 | ||
5201 | if (key_field->flags & HIST_FIELD_FL_STACKTRACE) { | 5199 | if (key_field->flags & HIST_FIELD_FL_STACKTRACE) { |
5202 | stacktrace.max_entries = HIST_STACKTRACE_DEPTH; | 5200 | memset(entries, 0, HIST_STACKTRACE_SIZE); |
5203 | stacktrace.entries = entries; | 5201 | stack_trace_save(entries, HIST_STACKTRACE_DEPTH, |
5204 | stacktrace.nr_entries = 0; | 5202 | HIST_STACKTRACE_SKIP); |
5205 | stacktrace.skip = HIST_STACKTRACE_SKIP; | ||
5206 | |||
5207 | memset(stacktrace.entries, 0, HIST_STACKTRACE_SIZE); | ||
5208 | save_stack_trace(&stacktrace); | ||
5209 | |||
5210 | key = entries; | 5203 | key = entries; |
5211 | } else { | 5204 | } else { |
5212 | field_contents = key_field->fn(key_field, elt, rbe, rec); | 5205 | field_contents = key_field->fn(key_field, elt, rbe, rec); |
@@ -5247,7 +5240,7 @@ static void hist_trigger_stacktrace_print(struct seq_file *m, | |||
5247 | unsigned int i; | 5240 | unsigned int i; |
5248 | 5241 | ||
5249 | for (i = 0; i < max_entries; i++) { | 5242 | for (i = 0; i < max_entries; i++) { |
5250 | if (stacktrace_entries[i] == ULONG_MAX) | 5243 | if (!stacktrace_entries[i]) |
5251 | return; | 5244 | return; |
5252 | 5245 | ||
5253 | seq_printf(m, "%*c", 1 + spaces, ' '); | 5246 | seq_printf(m, "%*c", 1 + spaces, ' '); |