From: Maynard J. <may...@us...> - 2007-02-02 16:27:43
|
Update of /cvsroot/oprofile/oprofile/utils In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10624/utils Modified Files: opcontrol ophelp.c Log Message: Add specific support for PowerPC970MP Index: opcontrol =================================================================== RCS file: /cvsroot/oprofile/oprofile/utils/opcontrol,v retrieving revision 1.135 retrieving revision 1.136 diff -u -p -d -r1.135 -r1.136 --- opcontrol 29 Jan 2007 11:40:00 -0000 1.135 +++ opcontrol 2 Feb 2007 16:27:31 -0000 1.136 @@ -1035,13 +1035,29 @@ set_ctr_param() } +# returns 1 if $CPUTYPE is a PPC64 variant +is_non_cell_ppc64_variant() +{ + case "$1" in + ppc64/power4 | ppc64/power5 | ppc64/power5+ | \ + ppc64/power6 | ppc64/970 | ppc64/970MP ) + return 1; + ;; + *) + return 0; + ;; + esac +} + + # The check_event_mapping_data procedure gives the # opportunity to validate events and enforce any # arch-specific restritions, etc. check_event_mapping_data() { - if [ "$CPUTYPE" = "ppc64/power4" -o "$CPUTYPE" = "ppc64/power5" -o "$CPUTYPE" = "ppc64/power5+" -o "$CPUTYPE" = "ppc64/970" -o "$CPUTYPE" = "ppc64/power6" ]; then + is_non_cell_ppc64_variant $CPUTYPE + if test $? -ne 0 ; then # For PPC64 architectures, the values required to program # MMCRs for the given event are returned along with the event. # Here we use those values to ensure that all chosen events Index: ophelp.c =================================================================== RCS file: /cvsroot/oprofile/oprofile/utils/ophelp.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -p -d -r1.12 -r1.13 --- ophelp.c 3 Jan 2007 20:32:48 -0000 1.12 +++ ophelp.c 2 Feb 2007 16:27:31 -0000 1.13 @@ -428,6 +428,7 @@ int main(int argc, char const * argv[]) case CPU_PPC64_POWER6: case CPU_PPC64_POWER5p: case CPU_PPC64_970: + case CPU_PPC64_970MP: printf("Obtain PowerPC64 processor documentation at:\n" "http://www-306.ibm.com/chips/techlib/techlib.nsf/productfamilies/PowerPC\n"); break; |