From: Maynard Johnson <maynardj@us.ibm.com>
To: Robert Richter <robert.richter@amd.com>
Cc: Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
oprofile-list <oprofile-list@lists.sourceforge.net>
Subject: Re: [PATCH 02/18] oprofile: rename cpu buffer functions
Date: Tue, 13 Jan 2009 12:02:29 -0600 [thread overview]
Message-ID: <496CD735.9040102@us.ibm.com> (raw)
In-Reply-To: <1231366655-17837-3-git-send-email-robert.richter@amd.com>
Robert Richter wrote:
> This patch renames cpu buffer functions to something more oprofile
> specific names. Functions will be moved to the global name space.
I'm not seeing where these functions are moved to the global name space, either in this set of 18 patches or the next set of 9 patches. Is that in some patch set that is yet to be posted?
>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Robert Richter <robert.richter@amd.com>
> ---
> drivers/oprofile/buffer_sync.c | 10 +++++-----
> drivers/oprofile/cpu_buffer.c | 4 ++--
> drivers/oprofile/cpu_buffer.h | 10 +++++-----
> 3 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/oprofile/buffer_sync.c b/drivers/oprofile/buffer_sync.c
> index 737bd94..d295d92 100644
> --- a/drivers/oprofile/buffer_sync.c
> +++ b/drivers/oprofile/buffer_sync.c
> @@ -331,7 +331,7 @@ static void add_ibs_begin(int cpu, int code, struct mm_struct *mm)
> off_t offset;
> struct op_sample *sample;
>
> - sample = cpu_buffer_read_entry(cpu);
> + sample = op_cpu_buffer_read_entry(cpu);
> if (!sample)
> goto Error;
> rip = sample->eip;
> @@ -370,7 +370,7 @@ static void add_ibs_begin(int cpu, int code, struct mm_struct *mm)
> count = IBS_OP_CODE_SIZE; /*IBS OP is 5 int64s*/
>
> for (i = 0; i < count; i++) {
> - sample = cpu_buffer_read_entry(cpu);
> + sample = op_cpu_buffer_read_entry(cpu);
> if (!sample)
> goto Error;
> add_event_entry(sample->eip);
> @@ -537,11 +537,11 @@ void sync_buffer(int cpu)
>
> add_cpu_switch(cpu);
>
> - cpu_buffer_reset(cpu);
> - available = cpu_buffer_entries(cpu);
> + op_cpu_buffer_reset(cpu);
> + available = op_cpu_buffer_entries(cpu);
>
> for (i = 0; i < available; ++i) {
> - struct op_sample *s = cpu_buffer_read_entry(cpu);
> + struct op_sample *s = op_cpu_buffer_read_entry(cpu);
> if (!s)
> break;
>
> diff --git a/drivers/oprofile/cpu_buffer.c b/drivers/oprofile/cpu_buffer.c
> index fcf96f6..e52c085 100644
> --- a/drivers/oprofile/cpu_buffer.c
> +++ b/drivers/oprofile/cpu_buffer.c
> @@ -152,14 +152,14 @@ add_sample(struct oprofile_cpu_buffer *cpu_buf,
> struct op_entry entry;
> int ret;
>
> - ret = cpu_buffer_write_entry(&entry);
> + ret = op_cpu_buffer_write_entry(&entry);
> if (ret)
> return ret;
>
> entry.sample->eip = pc;
> entry.sample->event = event;
>
> - ret = cpu_buffer_write_commit(&entry);
> + ret = op_cpu_buffer_write_commit(&entry);
> if (ret)
> return ret;
>
> diff --git a/drivers/oprofile/cpu_buffer.h b/drivers/oprofile/cpu_buffer.h
> index aacb0f0..83d491e 100644
> --- a/drivers/oprofile/cpu_buffer.h
> +++ b/drivers/oprofile/cpu_buffer.h
> @@ -64,7 +64,7 @@ DECLARE_PER_CPU(struct oprofile_cpu_buffer, cpu_buffer);
> * reset these to invalid values; the next sample collected will
> * populate the buffer with proper values to initialize the buffer
> */
> -static inline void cpu_buffer_reset(int cpu)
> +static inline void op_cpu_buffer_reset(int cpu)
> {
> struct oprofile_cpu_buffer *cpu_buf = &per_cpu(cpu_buffer, cpu);
>
> @@ -72,7 +72,7 @@ static inline void cpu_buffer_reset(int cpu)
> cpu_buf->last_task = NULL;
> }
>
> -static inline int cpu_buffer_write_entry(struct op_entry *entry)
> +static inline int op_cpu_buffer_write_entry(struct op_entry *entry)
> {
> entry->event = ring_buffer_lock_reserve(op_ring_buffer_write,
> sizeof(struct op_sample),
> @@ -88,13 +88,13 @@ static inline int cpu_buffer_write_entry(struct op_entry *entry)
> return 0;
> }
>
> -static inline int cpu_buffer_write_commit(struct op_entry *entry)
> +static inline int op_cpu_buffer_write_commit(struct op_entry *entry)
> {
> return ring_buffer_unlock_commit(op_ring_buffer_write, entry->event,
> entry->irq_flags);
> }
>
> -static inline struct op_sample *cpu_buffer_read_entry(int cpu)
> +static inline struct op_sample *op_cpu_buffer_read_entry(int cpu)
> {
> struct ring_buffer_event *e;
> e = ring_buffer_consume(op_ring_buffer_read, cpu, NULL);
> @@ -111,7 +111,7 @@ static inline struct op_sample *cpu_buffer_read_entry(int cpu)
> }
>
> /* "acquire" as many cpu buffer slots as we can */
> -static inline unsigned long cpu_buffer_entries(int cpu)
> +static inline unsigned long op_cpu_buffer_entries(int cpu)
> {
> return ring_buffer_entries_cpu(op_ring_buffer_read, cpu)
> + ring_buffer_entries_cpu(op_ring_buffer_write, cpu);
next prev parent reply other threads:[~2009-01-13 18:01 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-07 22:17 [0/18] oprofile: fixes and cleanup patches Robert Richter
2009-01-07 22:17 ` [PATCH 01/18] oprofile: rename kernel-wide identifiers Robert Richter
2009-01-13 17:53 ` Maynard Johnson
2009-01-14 14:21 ` Robert Richter
2009-01-07 22:17 ` [PATCH 02/18] oprofile: rename cpu buffer functions Robert Richter
2009-01-13 18:02 ` Maynard Johnson [this message]
2009-01-07 22:17 ` [PATCH 03/18] oprofile: remove ring buffer inline functions in cpu_buffer.h Robert Richter
2009-01-07 22:17 ` [PATCH 04/18] x86/oprofile: fix pci_dev use count for AMD northbridge devices Robert Richter
2009-01-07 22:17 ` [PATCH 05/18] oprofile: reordering some code in cpu_buffer.c Robert Richter
2009-01-07 22:17 ` [PATCH 06/18] oprofile: add inline function __oprofile_add_ext_sample() Robert Richter
2009-01-07 22:17 ` [PATCH 07/18] oprofile: simplify add_sample() Robert Richter
2009-01-07 22:17 ` [PATCH 08/18] oprofile: simplify sync_buffer() Robert Richter
2009-01-07 22:17 ` [PATCH 09/18] oprofile: simplify oprofile_begin_trace() Robert Richter
2009-01-07 22:17 ` [PATCH 10/18] oprofile: simplify add_sample() in cpu_buffer.c Robert Richter
2009-01-07 22:17 ` [PATCH 11/18] oprofile: simplify add_ibs_begin() Robert Richter
2009-01-07 22:17 ` [PATCH 12/18] oprofile: remove unused components in struct oprofile_cpu_buffer Robert Richter
2009-01-07 22:17 ` [PATCH 13/18] oprofile: remove unused ibs macro Robert Richter
2009-01-07 22:17 ` [PATCH 14/18] oprofile: remove backtrace code for ibs Robert Richter
2009-01-07 22:17 ` [PATCH 15/18] oprofile: making add_sample_entry() inline Robert Richter
2009-01-07 22:17 ` [PATCH 16/18] oprofile: rename variable ibs_allowed to has_ibs in op_model_amd.c Robert Richter
2009-01-07 22:17 ` [PATCH 17/18] oprofile: rename add_sample() in cpu_buffer.c Robert Richter
2009-01-07 22:17 ` [PATCH 18/18] oprofile: rename variables in add_ibs_begin() Robert Richter
2009-01-08 12:10 ` [0/18] oprofile: fixes and cleanup patches Ingo Molnar
2009-01-13 19:51 ` Maynard Johnson
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=496CD735.9040102@us.ibm.com \
--to=maynardj@us.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oprofile-list@lists.sourceforge.net \
--cc=robert.richter@amd.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox