All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Frank Ch. Eigler" <fche@redhat.com>,
	Johannes Berg <johannes.berg@intel.com>
Subject: Re: [PATCH 1/1 v11] Tracepoint: register/unregister struct tracepoint
Date: Wed, 9 Apr 2014 00:33:44 +0000 (UTC)	[thread overview]
Message-ID: <1472224719.1062.1397003624317.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <20140408201705.4dad2c4a@gandalf.local.home>

----- Original Message -----
> From: "Steven Rostedt" <rostedt@goodmis.org>
> To: "Mathieu Desnoyers" <mathieu.desnoyers@efficios.com>
> Cc: linux-kernel@vger.kernel.org, "Ingo Molnar" <mingo@kernel.org>, "Frederic Weisbecker" <fweisbec@gmail.com>,
> "Andrew Morton" <akpm@linux-foundation.org>, "Frank Ch. Eigler" <fche@redhat.com>, "Johannes Berg"
> <johannes.berg@intel.com>
> Sent: Tuesday, April 8, 2014 8:17:05 PM
> Subject: Re: [PATCH 1/1 v11] Tracepoint: register/unregister struct tracepoint
> 
> OK, I kicked off my tests to test this patch. If all goes well, I'll
> push it to linux-next and then off to Linus.
> 
> But I also added a patch on top. This shouldn't cause any issues for
> you, does it?

It allright by me. You can add my

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

Thanks!

Mathieu

> 
> -- Steve
> 
> From a22720af7d7d2e06284fbed68bd93827f75381b1 Mon Sep 17 00:00:00 2001
> From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
> Date: Tue, 8 Apr 2014 20:09:40 -0400
> Subject: [PATCH] tracepoint: Simplify tracepoint module search
> 
> Instead of copying the num_tracepoints and tracepoints_ptrs from
> the module structure to the tp_mod structure, which only uses it to
> find the module associated to tracepoints of modules that are coming
> and going, simply copy the pointer to the module struct to the tracepoint
> tp_module structure.
> 
> Also removed un-needed brackets around an if statement.
> 
> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
> ---
>  include/linux/tracepoint.h | 3 +--
>  kernel/tracepoint.c        | 9 ++++-----
>  2 files changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h
> index 08150e2..69a298b 100644
> --- a/include/linux/tracepoint.h
> +++ b/include/linux/tracepoint.h
> @@ -47,8 +47,7 @@ for_each_kernel_tracepoint(void (*fct)(struct tracepoint
> *tp, void *priv),
>  #ifdef CONFIG_MODULES
>  struct tp_module {
>  	struct list_head list;
> -	unsigned int num_tracepoints;
> -	struct tracepoint * const *tracepoints_ptrs;
> +	struct module *mod;
>  };
>  
>  bool trace_module_has_bad_taint(struct module *mod);
> diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
> index 8c4f2f4..c115ec4 100644
> --- a/kernel/tracepoint.c
> +++ b/kernel/tracepoint.c
> @@ -374,8 +374,7 @@ static int tracepoint_module_coming(struct module *mod)
>  		ret = -ENOMEM;
>  		goto end;
>  	}
> -	tp_mod->num_tracepoints = mod->num_tracepoints;
> -	tp_mod->tracepoints_ptrs = mod->tracepoints_ptrs;
> +	tp_mod->mod = mod;
>  	list_add_tail(&tp_mod->list, &tracepoint_module_list);
>  	blocking_notifier_call_chain(&tracepoint_notify_list,
>  			MODULE_STATE_COMING, tp_mod);
> @@ -393,7 +392,7 @@ static void tracepoint_module_going(struct module *mod)
>  
>  	mutex_lock(&tracepoint_module_list_mutex);
>  	list_for_each_entry(tp_mod, &tracepoint_module_list, list) {
> -		if (tp_mod->tracepoints_ptrs == mod->tracepoints_ptrs) {
> +		if (tp_mod->mod == mod) {
>  			blocking_notifier_call_chain(&tracepoint_notify_list,
>  					MODULE_STATE_GOING, tp_mod);
>  			list_del(&tp_mod->list);
> @@ -447,9 +446,9 @@ static __init int init_tracepoints(void)
>  	int ret;
>  
>  	ret = register_module_notifier(&tracepoint_module_nb);
> -	if (ret) {
> +	if (ret)
>  		pr_warning("Failed to register tracepoint module enter notifier\n");
> -	}
> +
>  	return ret;
>  }
>  __initcall(init_tracepoints);
> --
> 1.8.5.3
> 
> 
> 

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

      reply	other threads:[~2014-04-09  0:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-08 21:26 [PATCH v11 0/1] Tracepoint API simplification, text size shrink Mathieu Desnoyers
2014-04-08 21:26 ` [PATCH 1/1 v11] Tracepoint: register/unregister struct tracepoint Mathieu Desnoyers
2014-04-09  0:17   ` Steven Rostedt
2014-04-09  0:33     ` Mathieu Desnoyers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1472224719.1062.1397003624317.JavaMail.zimbra@efficios.com \
    --to=mathieu.desnoyers@efficios.com \
    --cc=akpm@linux-foundation.org \
    --cc=fche@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=johannes.berg@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.