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


Groups > linux.kernel > #1558552

Re: [RFC/PATCH] ftrace: Allow to change size of function graph filters

From Steven Rostedt <rostedt@goodmis.org>
Newsgroups linux.kernel
Subject Re: [RFC/PATCH] ftrace: Allow to change size of function graph filters
Date 2017-01-13 17:20 +0100
Message-ID <sZcK6-31P-21@gated-at.bofh.it> (permalink)
References <sZ1F0-4HH-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, 13 Jan 2017 13:22:43 +0900
Namhyung Kim <namhyung@kernel.org> wrote:

> It's currently fixed to 32 and it ignores when user gives a pattern
> which match to functions more than the size.  So filtering like all
> system calls or many functions with common prefix cannot be set all.
> Not sure this is right though.

Yes it's small, and there's a reason for it. So I'm giving a
conditional nack to the patch.
> 
> This patch adds 'graph_filter_size' file in the tracefs to adjust the
> size.  It can be changed only if the current tracer is not set.
> 
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>

The condition is, we need to fix ftrace_graph_addr() first.

	for (i = 0; i < ftrace_graph_count; i++) {

That gets called at every function being traced. See where I'm heading
with that? ;-)

We need to create a hash table or binary search first and make that
function handle a large ftrace_graph_count before implementing your
patch. Remove the linear search, replace it with either a binary search
or a hash. But an O(n) algorithm at every function call is out of the
question.

Thanks!

-- Steve

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


Thread

[RFC/PATCH] ftrace: Allow to change size of function graph filters Namhyung Kim <namhyung@kernel.org> - 2017-01-13 05:30 +0100
  Re: [RFC/PATCH] ftrace: Allow to change size of function graph  filters Steven Rostedt <rostedt@goodmis.org> - 2017-01-13 17:20 +0100
    Re: [RFC/PATCH] ftrace: Allow to change size of function graph  filters Namhyung Kim <namhyung@kernel.org> - 2017-01-14 05:40 +0100
      Re: [RFC/PATCH] ftrace: Allow to change size of function graph  filters Steven Rostedt <rostedt@goodmis.org> - 2017-01-14 06:00 +0100

csiph-web