lkml.org 
[lkml]   [2015]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v17 04/19] perf, tools: Support CPU ID matching for Powerpc
    Date
    Implement code that returns the generic CPU ID string for Powerpc.
    This will be used to identify the specific table of PMU events to
    parse/compare user specified events against.

    Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
    Acked-by: Jiri Olsa <jolsa@redhat.com>
    ---

    Changelog[v14]
    - [Jiri Olsa] Move this independent code off into a separate patch.
    ---
    tools/perf/arch/powerpc/util/header.c | 11 +++++++++++
    1 file changed, 11 insertions(+)

    diff --git a/tools/perf/arch/powerpc/util/header.c b/tools/perf/arch/powerpc/util/header.c
    index 6c1b8a7..65f9391 100644
    --- a/tools/perf/arch/powerpc/util/header.c
    +++ b/tools/perf/arch/powerpc/util/header.c
    @@ -32,3 +32,14 @@ get_cpuid(char *buffer, size_t sz)
    }
    return -1;
    }
    +
    +char *
    +get_cpuid_str(void)
    +{
    + char *bufp;
    +
    + if (asprintf(&bufp, "%.8lx", mfspr(SPRN_PVR)) < 0)
    + bufp = NULL;
    +
    + return bufp;
    +}
    --
    2.5.3


    \
     
     \ /
      Last update: 2015-09-29 03:21    [W:4.198 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site