From: Maynard Johnson <maynardj@us.ibm.com>
To: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Cc: linuxppc-dev@ozlabs.org, afleming@freescale.com,
oprofile-list@lists.sourceforge.net
Subject: Re: oprofile callgraph support missing for common cpus
Date: Thu, 17 Nov 2011 11:30:46 -0600 [thread overview]
Message-ID: <4EC544C6.3050502@us.ibm.com> (raw)
In-Reply-To: <OFD9ADD493.27DB131E-ONC125794B.002E2035-C125794B.002F715A@transmode.se>
On 11/17/2011 2:38 AM, Joakim Tjernlund wrote:
>
> arch/powerpc/oprofile/common.c has this init code:
>
> int __init oprofile_arch_init(struct oprofile_operations *ops)
> {
> if (!cur_cpu_spec->oprofile_cpu_type)
> return -ENODEV;
>
> if (firmware_has_feature(FW_FEATURE_ISERIES))
> return -ENODEV;
>
> switch (cur_cpu_spec->oprofile_type) {
> #ifdef CONFIG_PPC_BOOK3S_64
> #ifdef CONFIG_OPROFILE_CELL
> case PPC_OPROFILE_CELL:
> if (firmware_has_feature(FW_FEATURE_LPAR))
> return -ENODEV;
> model =&op_model_cell;
> ops->sync_start = model->sync_start;
> ops->sync_stop = model->sync_stop;
> break;
> #endif
> case PPC_OPROFILE_RS64:
> model =&op_model_rs64;
> break;
> case PPC_OPROFILE_POWER4:
> model =&op_model_power4;
> break;
> case PPC_OPROFILE_PA6T:
> model =&op_model_pa6t;
> break;
> #endif
> #ifdef CONFIG_6xx
> case PPC_OPROFILE_G4:
> model =&op_model_7450;
> break;
> #endif
> #if defined(CONFIG_FSL_EMB_PERFMON)
> case PPC_OPROFILE_FSL_EMB:
> model =&op_model_fsl_emb;
> break;
> #endif
> default:
> return -ENODEV;
> }
>
> model->num_counters = cur_cpu_spec->num_pmcs;
>
> ops->cpu_type = cur_cpu_spec->oprofile_cpu_type;
> ops->create_files = op_powerpc_create_files;
> ops->setup = op_powerpc_setup;
> ops->shutdown = op_powerpc_shutdown;
> ops->start = op_powerpc_start;
> ops->stop = op_powerpc_stop;
> ops->backtrace = op_powerpc_backtrace;
> }
>
> Notice the first
> if (!cur_cpu_spec->oprofile_cpu_type)
> return -ENODEV;
>
> if (firmware_has_feature(FW_FEATURE_ISERIES))
> return -ENODEV;
> For my e300c2 cpu both if's are false and I don't get support for callgraph/backtrace
> support. Moving the ops->backtrace = op_powerpc_backtrace; to the top
> enables backtrace for me.
What kernel version are you using? Actually, looking at a 3.0.3 tree I happen
to have available, I see oprofile h/w event support (in
arch/powerpc/kernel/cputable.c) for e300c3 and e300c4, but not the other e300
flavors. I've added Andy Flemming from Freescale to cc. Maybe he knows why
e300c2 isn't supported.
-Maynard
>
> This function needs fixing so its not all or nothing but I cannot make out
> what is what so please, could someone look at this?
>
> I am somewhat behind mainline so I will just use my hack for now.
>
> Jocke
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> _______________________________________________
> oprofile-list mailing list
> oprofile-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oprofile-list
>
next prev parent reply other threads:[~2011-11-17 17:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-17 8:38 oprofile callgraph support missing for common cpus Joakim Tjernlund
2011-11-17 17:30 ` Maynard Johnson [this message]
2011-11-17 17:51 ` Andy Fleming
2011-11-17 21:27 ` Joakim Tjernlund
2011-11-17 23:20 ` Robert Richter
2011-11-18 8:09 ` Joakim Tjernlund
2011-11-18 8:22 ` Joakim Tjernlund
2011-11-25 5:24 ` Benjamin Herrenschmidt
2011-11-25 5:58 ` Juntang Fu(David)
2011-12-05 8:50 ` Joakim Tjernlund
2011-12-05 9:01 ` Benjamin Herrenschmidt
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=4EC544C6.3050502@us.ibm.com \
--to=maynardj@us.ibm.com \
--cc=afleming@freescale.com \
--cc=joakim.tjernlund@transmode.se \
--cc=linuxppc-dev@ozlabs.org \
--cc=oprofile-list@lists.sourceforge.net \
/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).