Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1577014

Re: [RFC][PATCH 02/21] tracing: Reimplement log2

From Steven Rostedt <rostedt@goodmis.org>
Newsgroups linux.kernel
Subject Re: [RFC][PATCH 02/21] tracing: Reimplement log2
Date 2017-02-08 21:20 +0100
Message-ID <t8GSC-4S1-13@gated-at.bofh.it> (permalink)
References <t8Ee5-3aO-3@gated-at.bofh.it> <t8Exs-3hZ-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed,  8 Feb 2017 11:24:58 -0600
Tom Zanussi <tom.zanussi@linux.intel.com> wrote:

>  static void destroy_hist_field(struct hist_field *hist_field)
>  {
> +	unsigned int i;
> +
> +	if (!hist_field)
> +		return;
> +
> +	for (i = 0; i < HIST_FIELD_OPERANDS_MAX; i++)
> +		destroy_hist_field(hist_field->operands[i]);

Recursive functions get me really nervous. What limits it? Is this user
defined? Perhaps we need to find a better way to handle this that's not
recursive, or at least put in a hard limit of the amount it can recurse.

-- Steve

> +
>  	kfree(hist_field);
>  }
>  
> @@ -377,7 +393,10 @@ static struct hist_field *create_hist_field(struct ftrace_event_field *field,
>  	}
>  
>  	if (flags & HIST_FIELD_FL_LOG2) {
> +		unsigned long fl = flags & ~HIST_FIELD_FL_LOG2;
>  		hist_field->fn = hist_field_log2;
> +		hist_field->operands[0] = create_hist_field(field, fl);
> +		hist_field->size = hist_field->operands[0]->size;
>  		goto out;
>  	}
>  

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC][PATCH 00/21] tracing: Inter-event (e.g. latency) support Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-02-08 18:30 +0100
  [RFC][PATCH 06/21] tracing: Increase tracing map KEYS_MAX size Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-02-08 18:30 +0100
  [RFC][PATCH 08/21] tracing: Make traceprobe parsing code reusable Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-02-08 18:30 +0100
    Re: [RFC][PATCH 08/21] tracing: Make traceprobe parsing code  reusable Steven Rostedt <rostedt@goodmis.org> - 2017-02-09 22:00 +0100
  [RFC][PATCH 20/21] tracing: Add 'onmax' hist trigger action support Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-02-08 18:40 +0100
  [RFC][PATCH 21/21] tracing: Add inter-event hist trigger Documentation Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-02-08 18:40 +0100
  [RFC][PATCH 17/21] tracing: Add hist trigger action hook Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-02-08 18:40 +0100
  [RFC][PATCH 01/21] tracing: Add hist_field_name() accessor Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-02-08 18:40 +0100
    Re: [RFC][PATCH 01/21] tracing: Add hist_field_name() accessor Steven Rostedt <rostedt@goodmis.org> - 2017-02-08 21:10 +0100
  [RFC][PATCH 13/21] tracing: Add simple expression support to hist triggers Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-02-08 18:40 +0100
  [RFC][PATCH 19/21] tracing: Add 'onmatch' hist trigger action support Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-02-08 18:40 +0100
  [RFC][PATCH 11/21] tracing: Add variable support to hist triggers Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-02-08 18:40 +0100
    Re: [RFC][PATCH 11/21] tracing: Add variable support to hist triggers Namhyung Kim <namhyung@kernel.org> - 2017-02-13 07:10 +0100
  [RFC][PATCH 18/21] tracing: Add support for 'synthetic' events Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-02-08 18:50 +0100
  [RFC][PATCH 04/21] tracing: Give event triggers access to ring_buffer_event Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-02-08 18:50 +0100
  [RFC][PATCH 02/21] tracing: Reimplement log2 Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-02-08 18:50 +0100
    Re: [RFC][PATCH 02/21] tracing: Reimplement log2 Steven Rostedt <rostedt@goodmis.org> - 2017-02-08 21:20 +0100
      Re: [RFC][PATCH 02/21] tracing: Reimplement log2 Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-02-08 21:30 +0100
  Re: [RFC][PATCH 00/21] tracing: Inter-event (e.g. latency) support Steven Rostedt <rostedt@goodmis.org> - 2017-02-08 21:10 +0100
    Re: [RFC][PATCH 00/21] tracing: Inter-event (e.g. latency) support Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-02-09 00:30 +0100
      Re: [RFC][PATCH 00/21] tracing: Inter-event (e.g. latency) support Steven Rostedt <rostedt@goodmis.org> - 2017-02-09 03:30 +0100
    Re: [RFC][PATCH 00/21] tracing: Inter-event (e.g. latency) support Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-02-09 01:00 +0100
  Re: [RFC][PATCH 00/21] tracing: Inter-event (e.g. latency) support Masami Hiramatsu <mhiramat@kernel.org> - 2017-02-09 00:20 +0100
    Re: [RFC][PATCH 00/21] tracing: Inter-event (e.g. latency) support Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-02-09 02:20 +0100
      Re: [RFC][PATCH 00/21] tracing: Inter-event (e.g. latency) support Masami Hiramatsu <mhiramat@kernel.org> - 2017-02-09 15:40 +0100
        Re: [RFC][PATCH 00/21] tracing: Inter-event (e.g. latency) support Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-02-09 18:20 +0100
          Re: [RFC][PATCH 00/21] tracing: Inter-event (e.g. latency) support Steven Rostedt <rostedt@goodmis.org> - 2017-02-09 21:00 +0100
      Re: [RFC][PATCH 00/21] tracing: Inter-event (e.g. latency) support fche@redhat.com (Frank Ch. Eigler) - 2017-02-09 17:10 +0100
        Re: [RFC][PATCH 00/21] tracing: Inter-event (e.g. latency) support Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-02-09 19:50 +0100
  Re: [RFC][PATCH 00/21] tracing: Inter-event (e.g. latency) support Namhyung Kim <namhyung@kernel.org> - 2017-02-10 05:20 +0100
    Re: [RFC][PATCH 00/21] tracing: Inter-event (e.g. latency) support Masami Hiramatsu <mhiramat@kernel.org> - 2017-02-10 12:50 +0100
      Re: [RFC][PATCH 00/21] tracing: Inter-event (e.g. latency) support Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-02-10 20:00 +0100
        Re: [RFC][PATCH 00/21] tracing: Inter-event (e.g. latency) support Namhyung Kim <namhyung@kernel.org> - 2017-02-13 02:10 +0100
    Re: [RFC][PATCH 00/21] tracing: Inter-event (e.g. latency) support Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-02-10 19:50 +0100

csiph-web