All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Martin Ichilevici de Oliveira <martin.i.oliveira@gmail.com>
Cc: Vince Weaver <vincent.weaver@maine.edu>,
	Jiri Olsa <jolsa@redhat.com>,
	linux-perf-users@vger.kernel.org
Subject: Re: Interrupt caused by software events
Date: Sat, 12 Jul 2014 20:34:15 -0700	[thread overview]
Message-ID: <871ttque2w.fsf@tassilo.jf.intel.com> (raw)
In-Reply-To: <20140711142058.GA27580@gamayun> (Martin Ichilevici de Oliveira's message of "Fri, 11 Jul 2014 11:20:58 -0300")

Martin Ichilevici de Oliveira <martin.i.oliveira@gmail.com> writes:
>
> /*******************/
> /* Gets called whenever my program generates a cache-miss */
> void my_func()
> {
>     unsigned long addr = get_ip_that_generated_event();
>     printf("A cache-miss occurred at IP: %x!\n", addr);
> }

This will almost certainly not work with any useful workload.
Just compare the overhead of the instrumentation with the total
run time. The program will be doing nothing but such interrupts
and perf will eventually throttle the interrupts. Besides
PEBS is not designed to catch every event anyways.

If you really want to instrument all cache misses you most likely
want to use some memory trace mechanism and a offline cache model
or a simulator.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only

      parent reply	other threads:[~2014-07-13  3:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-08 14:42 Interrupt caused by software events Martin Ichilevici de Oliveira
2014-07-09 13:54 ` Jiri Olsa
2014-07-09 14:05 ` Vince Weaver
2014-07-11 14:20   ` Martin Ichilevici de Oliveira
2014-07-11 15:26     ` Vince Weaver
2014-07-12 21:15     ` Jiri Olsa
2014-07-13  3:34     ` Andi Kleen [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=871ttque2w.fsf@tassilo.jf.intel.com \
    --to=andi@firstfloor.org \
    --cc=jolsa@redhat.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=martin.i.oliveira@gmail.com \
    --cc=vincent.weaver@maine.edu \
    /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.