mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Jaswinder Singh Rajput <jaswinder@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	x86 maintainers <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -tip RESEND] perf_counter x86: fix cache_event_ids table
Date: Sun, 28 Jun 2009 15:37:45 +0200	[thread overview]
Message-ID: <20090628133745.GA1942@elte.hu> (raw)
In-Reply-To: <1246129608.32198.29.camel@hpdv5.satnam>


* Jaswinder Singh Rajput <jaswinder@kernel.org> wrote:

> + [C(L1D,  READ,     ACCESS)] = 0x0f40, /* L1D_CACHE_LD.MESI		*/
> + [C(L1D,  READ,     MISSES)] = 0x0140, /* L1D_CACHE_LD.I_STATE		*/

Dont you see how weird 'access' versus 'misses' reads?

Also, i like the PowerPC style more:

static int mpc7450_cache_events[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = 
{
        [C(L1D)] = {            /*      RESULT_ACCESS   RESULT_MISS */
                [C(OP_READ)] = {        0,              0x225   },
                [C(OP_WRITE)] = {       0,              0x227   },
                [C(OP_PREFETCH)] = {    0,              0       },
        },
        [C(L1I)] = {            /*      RESULT_ACCESS   RESULT_MISS */
                [C(OP_READ)] = {        0x129,          0x115   },
                [C(OP_WRITE)] = {       -1,             -1      },
                [C(OP_PREFETCH)] = {    0x634,          0       },
        },

See how readable a two dimensional array is?

If we change the definitions on x86 then i'd suggest a small variant 
of this:

        [C(L1D)] = {          /* {  ACCESS         MISS   } */
                [C(READ    )]  = {       0,       0x225   },
                [C(WRITE   )]  = {       0,       0x227   },
                [C(PREFETCH)]  = {       0,           0   },
        },

	Ingo

      reply	other threads:[~2009-06-28 13:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-27 19:06 Jaswinder Singh Rajput
2009-06-28 13:37 ` Ingo Molnar [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=20090628133745.GA1942@elte.hu \
    --to=mingo@elte.hu \
    --cc=jaswinder@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®