mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lin Ming <ming.m.lin@intel.com>
To: Stephane Eranian <eranian@gmail.com>,
	Robert Richter <robert.richter@amd.com>,
	Cyrill Gorcunov <gorcunov@gmail.com>
Cc: perfmon2-devel@lists.sourceforge.net,
	lkml <linux-kernel@vger.kernel.org>
Subject: libpfm4 faults on P4 machine
Date: Wed, 18 Aug 2010 15:46:01 +0800	[thread overview]
Message-ID: <1282117561.11858.54.camel@minggr.sh.intel.com> (raw)

On P4 machine, intel_x86_arch_support.get_event_info(...) faults because
intel_x86_arch_support.pe is NULL.

intel_x86_arch_support.pe is set at run time, but P4 does not have arch
event support, so intel_x86_arch_support.pe is always NULL.

#gdb libpfm4/examples/check_events

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb785caf0 (LWP 3950)]
0x0804d74b in pfm_intel_x86_get_event_info (this=0x81c5f80, idx=0, info=0xbff45f14)
    at pfmlib_intel_x86.c:667
667		info->desc  = pe[idx].desc;
(gdb) bt
#0  0x0804d74b in pfm_intel_x86_get_event_info (this=0x81c5f80, idx=0, info=0xbff45f14)
    at pfmlib_intel_x86.c:667
#1  0x08049cd3 in pfmlib_parse_event (event=0x804fb7b "PERF_COUNT_HW_CPU_CYCLES", d=0xbff45f7c)
    at pfmlib_common.c:676
#2  0x08049f3f in pfm_get_event_encoding (str=0x804fb7b "PERF_COUNT_HW_CPU_CYCLES", dfl_plm=8, 
    fstr=0xbff464d4, idx=0xbff464c8, codes=0xbff464d0, count=0xbff464cc) at pfmlib_common.c:877
#3  0x08048dc1 in main (argc=<value optimized out>, argv=0xbff46584) at check_events.c:118
(gdb) list
662	
663		/*
664		 * pmu and idx filled out by caller
665		 */
666		info->name  = pe[idx].name;
667		info->desc  = pe[idx].desc;
668		info->code  = pe[idx].code;
669		info->equiv = pe[idx].equiv;
670	
671		/* unit masks + modifiers */
(gdb)

Any fix?

Lin Ming


             reply	other threads:[~2010-08-18  7:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-18  7:46 Lin Ming [this message]
2010-08-18  9:21 ` stephane eranian
2010-08-18  9:42   ` 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=1282117561.11858.54.camel@minggr.sh.intel.com \
    --to=ming.m.lin@intel.com \
    --cc=eranian@gmail.com \
    --cc=gorcunov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perfmon2-devel@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

all inboxes | Powered by JetHome®