linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* oprofile callgraph support missing for common cpus
@ 2011-11-17  8:38 Joakim Tjernlund
  2011-11-17 17:30 ` Maynard Johnson
  0 siblings, 1 reply; 11+ messages in thread
From: Joakim Tjernlund @ 2011-11-17  8:38 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: oprofile-list


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.

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-12-05  9:01 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-17  8:38 oprofile callgraph support missing for common cpus Joakim Tjernlund
2011-11-17 17:30 ` Maynard Johnson
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

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).