From: Arun Sharma <arun@sharma-home.net>
To: Easley <ugiwgh@gmail.com>
Cc: linux-perf-users@vger.kernel.org, Lin Ming <ming.m.lin@intel.com>,
chenwj <chenwj@iis.sinica.edu.tw>,
perfmon2-devel <perfmon2-devel@lists.sourceforge.net>
Subject: Re: How does take use of EventName and UnitMask?
Date: Thu, 17 Mar 2011 14:03:25 -0700 [thread overview]
Message-ID: <AANLkTi=e_gB-hLqxf4Cyoh9u+Cb4pdxpfGJZrZd2gKf=@mail.gmail.com> (raw)
In-Reply-To: <AANLkTinjmVwtWpAnGPyehn0kT6U3KQWKPU0iz=Fb45aA@mail.gmail.com>
On Thu, Mar 17, 2011 at 8:43 AM, Arun Sharma <arun@sharma-home.net> wrote:
>
> Stephane has disabled the uncore event support in libpfm4 (since the
> patch is still not upstream yet). But by uncommenting 2-3 lines of
> code, you should be able to get uncore events working.
>
This is the patch I'm using for uncore events with perf + libpfm4.
diff --git a/include/perfmon/perf_event.h b/include/perfmon/perf_event.h
index 4ba6738..ef68265 100644
--- a/include/perfmon/perf_event.h
+++ b/include/perfmon/perf_event.h
@@ -46,6 +46,7 @@ enum perf_type_id {
PERF_TYPE_HW_CACHE = 3,
PERF_TYPE_RAW = 4,
PERF_TYPE_BREAKPOINT = 5,
+ PERF_TYPE_UNCORE = 6,
PERF_TYPE_MAX
};
diff --git a/lib/pfmlib_intel_x86_perf_event.c
b/lib/pfmlib_intel_x86_perf_event.c
index ab282dd..b35dccd 100644
--- a/lib/pfmlib_intel_x86_perf_event.c
+++ b/lib/pfmlib_intel_x86_perf_event.c
@@ -81,10 +81,7 @@ pfm_intel_nhm_unc_get_perf_encoding(void *this,
pfmlib_event_desc_t *e)
if (ret != PFM_SUCCESS)
return ret;
-#if 0
- /* XXX: uncomment when uncore support is upstream */
attr->type = PERF_TYPE_UNCORE;
-#endif
attr->config = e->codes[0];
/*
* uncore measures at all priv levels
diff --git a/lib/pfmlib_perf_event.c b/lib/pfmlib_perf_event.c
index 824f9a5..d2eea5e 100644
--- a/lib/pfmlib_perf_event.c
+++ b/lib/pfmlib_perf_event.c
@@ -157,7 +157,7 @@ pfmlib_perf_event_encode(void *this, const char
*str, int dfl_plm, void *data)
attr->exclude_user = !(plm & PFM_PLM3);
attr->exclude_kernel = !(plm & PFM_PLM0);
- attr->exclude_hv = !(plm & PFM_PLMH);
+ //attr->exclude_hv = !(plm & PFM_PLMH);
__pfm_vbprintf("PERF[type=%x config=0x%"PRIx64" config1=0x%"PRIx64
" e_u=%d e_k=%d e_hv=%d period=%"PRIu64" freq=%d"
-Arun
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
next prev parent reply other threads:[~2011-03-17 21:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <tencent_5D9EFCFD67548CB92638B8BA@qq.com>
2011-03-17 15:43 ` [perfmon2] How does take use of EventName and UnitMask? Arun Sharma
2011-03-17 21:03 ` Arun Sharma [this message]
2011-03-19 15:04 ` stephane eranian
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='AANLkTi=e_gB-hLqxf4Cyoh9u+Cb4pdxpfGJZrZd2gKf=@mail.gmail.com' \
--to=arun@sharma-home.net \
--cc=chenwj@iis.sinica.edu.tw \
--cc=linux-perf-users@vger.kernel.org \
--cc=ming.m.lin@intel.com \
--cc=perfmon2-devel@lists.sourceforge.net \
--cc=ugiwgh@gmail.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;
as well as URLs for NNTP newsgroup(s).