2009-07-06 08:15:14

by Li Zefan

[permalink] [raw]
Subject: [PATCH] kmemtrace: rename some functions

So we have:
- kmemtrace_print_alloc/free() for kmemtrace default output
- kmemtrace_print_alloc/free_user() for binary output used
by kmemtrace-user.

Signed-off-by: Li Zefan <[email protected]>
---

forgot to CC LKML...again..

---
kernel/trace/kmemtrace.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/kernel/trace/kmemtrace.c b/kernel/trace/kmemtrace.c
index 74903b6..256827b 100644
--- a/kernel/trace/kmemtrace.c
+++ b/kernel/trace/kmemtrace.c
@@ -239,7 +239,7 @@ struct kmemtrace_user_event_alloc {
};

static enum print_line_t
-kmemtrace_print_alloc_user(struct trace_iterator *iter, int flags)
+kmemtrace_print_alloc(struct trace_iterator *iter, int flags)
{
struct trace_seq *s = &iter->seq;
struct kmemtrace_alloc_entry *entry;
@@ -259,7 +259,7 @@ kmemtrace_print_alloc_user(struct trace_iterator *iter, int flags)
}

static enum print_line_t
-kmemtrace_print_free_user(struct trace_iterator *iter, int flags)
+kmemtrace_print_free(struct trace_iterator *iter, int flags)
{
struct trace_seq *s = &iter->seq;
struct kmemtrace_free_entry *entry;
@@ -277,7 +277,7 @@ kmemtrace_print_free_user(struct trace_iterator *iter, int flags)
}

static enum print_line_t
-kmemtrace_print_alloc_user_bin(struct trace_iterator *iter, int flags)
+kmemtrace_print_alloc_user(struct trace_iterator *iter, int flags)
{
struct trace_seq *s = &iter->seq;
struct kmemtrace_alloc_entry *entry;
@@ -311,7 +311,7 @@ kmemtrace_print_alloc_user_bin(struct trace_iterator *iter, int flags)
}

static enum print_line_t
-kmemtrace_print_free_user_bin(struct trace_iterator *iter, int flags)
+kmemtrace_print_free_user(struct trace_iterator *iter, int flags)
{
struct trace_seq *s = &iter->seq;
struct kmemtrace_free_entry *entry;
@@ -482,14 +482,14 @@ static enum print_line_t kmemtrace_print_line(struct trace_iterator *iter)

static struct trace_event kmem_trace_alloc = {
.type = TRACE_KMEM_ALLOC,
- .trace = kmemtrace_print_alloc_user,
- .binary = kmemtrace_print_alloc_user_bin,
+ .trace = kmemtrace_print_alloc,
+ .binary = kmemtrace_print_alloc_user,
};

static struct trace_event kmem_trace_free = {
.type = TRACE_KMEM_FREE,
- .trace = kmemtrace_print_free_user,
- .binary = kmemtrace_print_free_user_bin,
+ .trace = kmemtrace_print_free,
+ .binary = kmemtrace_print_free_user,
};

static struct tracer kmem_tracer __read_mostly = {
--
1.5.4.rc3


2009-07-06 08:25:01

by Pekka Enberg

[permalink] [raw]
Subject: Re: [PATCH] kmemtrace: rename some functions

On Mon, 2009-07-06 at 16:15 +0800, Li Zefan wrote:
> So we have:
> - kmemtrace_print_alloc/free() for kmemtrace default output
> - kmemtrace_print_alloc/free_user() for binary output used
> by kmemtrace-user.
>
> Signed-off-by: Li Zefan <[email protected]>

I think this is what you suggested Eduard?

Acked-by: Pekka Enberg <[email protected]>

> ---
>
> forgot to CC LKML...again..
>
> ---
> kernel/trace/kmemtrace.c | 16 ++++++++--------
> 1 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/kernel/trace/kmemtrace.c b/kernel/trace/kmemtrace.c
> index 74903b6..256827b 100644
> --- a/kernel/trace/kmemtrace.c
> +++ b/kernel/trace/kmemtrace.c
> @@ -239,7 +239,7 @@ struct kmemtrace_user_event_alloc {
> };
>
> static enum print_line_t
> -kmemtrace_print_alloc_user(struct trace_iterator *iter, int flags)
> +kmemtrace_print_alloc(struct trace_iterator *iter, int flags)
> {
> struct trace_seq *s = &iter->seq;
> struct kmemtrace_alloc_entry *entry;
> @@ -259,7 +259,7 @@ kmemtrace_print_alloc_user(struct trace_iterator *iter, int flags)
> }
>
> static enum print_line_t
> -kmemtrace_print_free_user(struct trace_iterator *iter, int flags)
> +kmemtrace_print_free(struct trace_iterator *iter, int flags)
> {
> struct trace_seq *s = &iter->seq;
> struct kmemtrace_free_entry *entry;
> @@ -277,7 +277,7 @@ kmemtrace_print_free_user(struct trace_iterator *iter, int flags)
> }
>
> static enum print_line_t
> -kmemtrace_print_alloc_user_bin(struct trace_iterator *iter, int flags)
> +kmemtrace_print_alloc_user(struct trace_iterator *iter, int flags)
> {
> struct trace_seq *s = &iter->seq;
> struct kmemtrace_alloc_entry *entry;
> @@ -311,7 +311,7 @@ kmemtrace_print_alloc_user_bin(struct trace_iterator *iter, int flags)
> }
>
> static enum print_line_t
> -kmemtrace_print_free_user_bin(struct trace_iterator *iter, int flags)
> +kmemtrace_print_free_user(struct trace_iterator *iter, int flags)
> {
> struct trace_seq *s = &iter->seq;
> struct kmemtrace_free_entry *entry;
> @@ -482,14 +482,14 @@ static enum print_line_t kmemtrace_print_line(struct trace_iterator *iter)
>
> static struct trace_event kmem_trace_alloc = {
> .type = TRACE_KMEM_ALLOC,
> - .trace = kmemtrace_print_alloc_user,
> - .binary = kmemtrace_print_alloc_user_bin,
> + .trace = kmemtrace_print_alloc,
> + .binary = kmemtrace_print_alloc_user,
> };
>
> static struct trace_event kmem_trace_free = {
> .type = TRACE_KMEM_FREE,
> - .trace = kmemtrace_print_free_user,
> - .binary = kmemtrace_print_free_user_bin,
> + .trace = kmemtrace_print_free,
> + .binary = kmemtrace_print_free_user,
> };
>
> static struct tracer kmem_tracer __read_mostly = {

2009-07-10 10:44:18

by Li Zefan

[permalink] [raw]
Subject: [tip:tracing/core] kmemtrace: Rename some functions

Commit-ID: 80098c200e2ee3b4c86a9d1e156dbcd05380e08f
Gitweb: http://git.kernel.org/tip/80098c200e2ee3b4c86a9d1e156dbcd05380e08f
Author: Li Zefan <[email protected]>
AuthorDate: Mon, 6 Jul 2009 16:15:04 +0800
Committer: Ingo Molnar <[email protected]>
CommitDate: Fri, 10 Jul 2009 12:09:04 +0200

kmemtrace: Rename some functions

So we have:

- kmemtrace_print_alloc/free() for kmemtrace default output

- kmemtrace_print_alloc/free_user() for binary output used
by kmemtrace-user.

Suggested-by: Eduard - Gabriel Munteanu <[email protected]>
Signed-off-by: Li Zefan <[email protected]>
Acked-by: Pekka Enberg <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>


---
kernel/trace/kmemtrace.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/kernel/trace/kmemtrace.c b/kernel/trace/kmemtrace.c
index 2f6fa47..dda53cc 100644
--- a/kernel/trace/kmemtrace.c
+++ b/kernel/trace/kmemtrace.c
@@ -239,7 +239,7 @@ struct kmemtrace_user_event_alloc {
};

static enum print_line_t
-kmemtrace_print_alloc_user(struct trace_iterator *iter, int flags)
+kmemtrace_print_alloc(struct trace_iterator *iter, int flags)
{
struct trace_seq *s = &iter->seq;
struct kmemtrace_alloc_entry *entry;
@@ -259,7 +259,7 @@ kmemtrace_print_alloc_user(struct trace_iterator *iter, int flags)
}

static enum print_line_t
-kmemtrace_print_free_user(struct trace_iterator *iter, int flags)
+kmemtrace_print_free(struct trace_iterator *iter, int flags)
{
struct trace_seq *s = &iter->seq;
struct kmemtrace_free_entry *entry;
@@ -277,7 +277,7 @@ kmemtrace_print_free_user(struct trace_iterator *iter, int flags)
}

static enum print_line_t
-kmemtrace_print_alloc_user_bin(struct trace_iterator *iter, int flags)
+kmemtrace_print_alloc_user(struct trace_iterator *iter, int flags)
{
struct trace_seq *s = &iter->seq;
struct kmemtrace_alloc_entry *entry;
@@ -311,7 +311,7 @@ kmemtrace_print_alloc_user_bin(struct trace_iterator *iter, int flags)
}

static enum print_line_t
-kmemtrace_print_free_user_bin(struct trace_iterator *iter, int flags)
+kmemtrace_print_free_user(struct trace_iterator *iter, int flags)
{
struct trace_seq *s = &iter->seq;
struct kmemtrace_free_entry *entry;
@@ -467,14 +467,14 @@ static enum print_line_t kmemtrace_print_line(struct trace_iterator *iter)

static struct trace_event kmem_trace_alloc = {
.type = TRACE_KMEM_ALLOC,
- .trace = kmemtrace_print_alloc_user,
- .binary = kmemtrace_print_alloc_user_bin,
+ .trace = kmemtrace_print_alloc,
+ .binary = kmemtrace_print_alloc_user,
};

static struct trace_event kmem_trace_free = {
.type = TRACE_KMEM_FREE,
- .trace = kmemtrace_print_free_user,
- .binary = kmemtrace_print_free_user_bin,
+ .trace = kmemtrace_print_free,
+ .binary = kmemtrace_print_free_user,
};

static struct tracer kmem_tracer __read_mostly = {