[Top] [All Lists]

Re: [PATCH] Loongson2: add a primary perf support (not applicable)

To: Wu Zhangjin <>
Subject: Re: [PATCH] Loongson2: add a primary perf support (not applicable)
From: Deng-Cheng Zhu <>
Date: Thu, 29 Apr 2010 11:29:59 +0800
Cc: loongson-dev <>,,, Zhang Le <>, yajin <>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=5sVHpaFvDyDd6bGSYtOV5jdKHIf8gWA3MmPCnC6b4jQ=; b=xsaZ7RzHGYWEp7p0qrsrRIDnDz08qtDQEIcNwUmmnTDmxXfsS90efaRRV6ZVkXwYx5 nF104g8CyyTc0Rb2jgmi8sJONNEp+O7Kkiz4y6Ct5OaOvBlj7f8gNbzmPQUivJ8gvNpG jBoJURSiyeY4NnhaSGVbmCv2MKwlkfOEVVy08=
Domainkey-signature: a=rsa-sha1; c=nofws;; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=jVMlM/5yLNMNR4PqIj6X52ozgK7zWyiMkDrvXqV67kV/t4a/jeu7tU96nnymIBRQr0 TUVLeDlCTyFAl3hJOTP8ysdaetk/ZuyGoAnGIVpHA1+DyBF7KDAxNUAS8VUd9i38yuXU TBGhJsW1G3pAes1AqaXWJ7VIKY+bWEbHDdZVA=
In-reply-to: <>
Original-recipient: rfc822;
References: <>
> And then you need to compile the user-space tools/perf with the following 
> steps
> if want to local-compile it:

And if you want to cross compile it, besides changing
tools/perf/perf.h, tools/perf/Makefile also needs to have proper
CFLAGS/LDFLAGS for headers and libs. Then it's OK to fire "make

> Currently, seems "./perf record" and lots of software events not work, anybody
> have interest in playing with it can refer to {tools/perf/Documentation,
> arch/mips/kernel/perf_event*, arch/mips/include/asm/pmu.h,
> arch/x86/kernel/cpu/perf_event*, arch/arm/kernel/perf_event* ...}.

"perf record" works fine on 24K/34K/74K cores. In addition, If you are
seeing the message "Couldn't record kernel reference relocation
symbol", and your kernel symbols only have _stext (without _text),
then search "_text" in builtin-record.c and replace with "_stext".
Here is the link:

For software events, it should be able to work without specific
changes for loongson, I suppose. Because changes have been done to
common MIPS code to support software events.

>  config HW_PERF_EVENTS
>        bool "Enable hardware performance counter support for perf events"
> -       depends on PERF_EVENTS && !MIPS_MT_SMTC && OPROFILE=n && CPU_MIPS32
> +       depends on PERF_EVENTS && !MIPS_MT_SMTC && OPROFILE=n
>        default y
>        help
>          Enable hardware performance counter support for perf events. If

How about adding CPU_LOONGSON2* instead of deleting CPU_MIPS32?
Because we want the perf functionality to be available when we are
able to choose it..

<Prev in Thread] Current Thread [Next in Thread>