linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Building perf failed on Linux/SPARC
@ 2011-03-14  9:51 陳韋任
  2011-03-14 19:15 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 7+ messages in thread
From: 陳韋任 @ 2011-03-14  9:51 UTC (permalink / raw)
  To: linux-perf-users; +Cc: chenwj

Hi, folks

  I have some problems while building perf on a Linux/SPARC machine.
Here is the system information.

$ uname -a
Linux sparc 2.6.37-rc5-git #1 SMP Tue Dec 21 17:03:53 CST 2010 sparc64 sun4v UltraSparc T2 (Niagara2) GNU/Linux
$ gcc --version
gcc (Gentoo 4.3.4 p1.0, pie-10.1.5) 4.3.4

  And here is the error message,
--------------------------------------------------------------------
$ make
<stdin>:1:20: error: libelf.h: No such file or directory
                ......
Makefile:419: *** No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel.  Stop.
--------------------------------------------------------------------

  I tried the code which is used to test libelf in the Makefile. But
it seems work correctly. Do I miss something? Or I just have to update
the kernel?

  Thanks!

Regards,
chenwj

-- 
Wei-Ren Chen (陳韋任)
Parallel Processing Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667

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

* Re: Building perf failed on Linux/SPARC
  2011-03-14  9:51 Building perf failed on Linux/SPARC 陳韋任
@ 2011-03-14 19:15 ` Arnaldo Carvalho de Melo
  2011-03-15  3:16   ` 陳韋任
  2011-03-17 18:32   ` [kernel.kallsyms] with build id ... not found, continuing without symbols john smith
  0 siblings, 2 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-03-14 19:15 UTC (permalink / raw)
  To: 陳韋任; +Cc: linux-perf-users, chenwj

Em Mon, Mar 14, 2011 at 05:51:21PM +0800, 陳韋任 escreveu:
>   I have some problems while building perf on a Linux/SPARC machine.
> Here is the system information.
> 
> $ uname -a
> Linux sparc 2.6.37-rc5-git #1 SMP Tue Dec 21 17:03:53 CST 2010 sparc64 sun4v UltraSparc T2 (Niagara2) GNU/Linux
> $ gcc --version
> gcc (Gentoo 4.3.4 p1.0, pie-10.1.5) 4.3.4
> 
>   And here is the error message,
> --------------------------------------------------------------------
> $ make
> <stdin>:1:20: error: libelf.h: No such file or directory
>                 ......
> Makefile:419: *** No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel.  Stop.
> --------------------------------------------------------------------
> 
>   I tried the code which is used to test libelf in the Makefile. But
> it seems work correctly. Do I miss something? Or I just have to update
> the kernel?

Gentoo, ok, can you make sure the package providing the libelf
implementation is elfutils?

There are other libelf implementations that could pass the simple test,
but which doesn't provide functions used in perf.

- Arnaldo

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

* Re: Building perf failed on Linux/SPARC
  2011-03-14 19:15 ` Arnaldo Carvalho de Melo
@ 2011-03-15  3:16   ` 陳韋任
       [not found]     ` <8CB5FB7FBAFD274A8E92A53BBAFE339D0ADF79@039-SN1MPN1-003.039d.mgd.msft.net>
  2011-03-17 18:32   ` [kernel.kallsyms] with build id ... not found, continuing without symbols john smith
  1 sibling, 1 reply; 7+ messages in thread
From: 陳韋任 @ 2011-03-15  3:16 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: 陳韋任, linux-perf-users

Hi,

  After installing elfutils and updating tools/perf, everything is
fine. I guess the old perf source might have a little trouble with
configuration in the Makefile.

  Thanks.

Regards,
chenwj

-- 
Wei-Ren Chen (陳韋任)
Parallel Processing Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667

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

* Re: Building perf failed on Linux/SPARC
       [not found]     ` <8CB5FB7FBAFD274A8E92A53BBAFE339D0ADF79@039-SN1MPN1-003.039d.mgd.msft.net>
@ 2011-03-15  8:20       ` 陳韋任
  2011-03-15 10:08         ` Kumar Ranjit-B04060
  0 siblings, 1 reply; 7+ messages in thread
From: 陳韋任 @ 2011-03-15  8:20 UTC (permalink / raw)
  To: Kumar Ranjit-B04060; +Cc: linux-perf-users

Hi, Kumar

  Here is the information of elfutils on gentoo linux,

dev-libs/elfutils
Homepage:      https://fedorahosted.org/elfutils

  And you might need to update the perf source code.

  HTH. :)

Regards,
chenwj

-- 
Wei-Ren Chen (陳韋任)
Parallel Processing Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667

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

* RE: Building perf failed on Linux/SPARC
  2011-03-15  8:20       ` 陳韋任
@ 2011-03-15 10:08         ` Kumar Ranjit-B04060
  2011-03-16  2:00           ` 陳韋任
  0 siblings, 1 reply; 7+ messages in thread
From: Kumar Ranjit-B04060 @ 2011-03-15 10:08 UTC (permalink / raw)
  To: 陳韋任; +Cc: linux-perf-users@vger.kernel.org

I am not able to build elfutils-0.152.tar.bz2. The error I am getting is

In file included from xstrndup.c:30:0:
/usr/include/string.h:546:5: error: expected declaration specifiers or '...' before '__locale
/usr/include/string.h:547:6: error: nonnull argument with out-of-range operand number (argument 1, operand 3)
/usr/include/string.h:550:18: error: expected declaration specifiers or '...' before '__locale_t'
/usr/include/string.h:551:6: error: nonnull argument with out-of-range operand number (argument 1, operand 4)
cc1: warnings being treated as errors
xstrndup.c: In function 'xstrndup':
xstrndup.c:41:3: error: implicit declaration of function 'strnlen'
make[2]: *** [xstrndup.o] Error 1
make[2]: Leaving directory `/home/user/ranjitk/elfutils-0.142/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/user/ranjitk/elfutils-0.142'
make: *** [all] Error 2

I am using the gcc-4.51.

Regards
Ranjit Kumar
System Performance Analysis Group
Freescale Semiconductors
India



-----Original Message-----
From: linux-perf-users-owner@vger.kernel.org [mailto:linux-perf-users-owner@vger.kernel.org] On Behalf Of ???
Sent: Tuesday, March 15, 2011 1:51 PM
To: Kumar Ranjit-B04060
Cc: linux-perf-users@vger.kernel.org
Subject: Re: Building perf failed on Linux/SPARC

Hi, Kumar

  Here is the information of elfutils on gentoo linux,

dev-libs/elfutils
Homepage:      https://fedorahosted.org/elfutils

  And you might need to update the perf source code.

  HTH. :)

Regards,
chenwj

--
Wei-Ren Chen (陳韋任)
Parallel Processing Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in the body of a message to majordomo@vger.kernel.org More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

* Re: Building perf failed on Linux/SPARC
  2011-03-15 10:08         ` Kumar Ranjit-B04060
@ 2011-03-16  2:00           ` 陳韋任
  0 siblings, 0 replies; 7+ messages in thread
From: 陳韋任 @ 2011-03-16  2:00 UTC (permalink / raw)
  To: Kumar Ranjit-B04060
  Cc: 陳韋任, linux-perf-users@vger.kernel.org

Hi, Kumar

  I built elfutils-0.152.tar.bz2 successfully on my system.
Maybe you can ask your system administrator to install perf.
Or you can consult your colleagues or the elfutils mailing list
for help.

  Here is the elfutils mailing list,
  https://fedorahosted.org/mailman/listinfo/elfutils-devel

Regards,
chenwj

-- 
Wei-Ren Chen (陳韋任)
Parallel Processing Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667

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

* [kernel.kallsyms] with build id ... not found, continuing without symbols
  2011-03-14 19:15 ` Arnaldo Carvalho de Melo
  2011-03-15  3:16   ` 陳韋任
@ 2011-03-17 18:32   ` john smith
  1 sibling, 0 replies; 7+ messages in thread
From: john smith @ 2011-03-17 18:32 UTC (permalink / raw)
  To: linux-perf-users

I'm running on 2.6.37.1-1.2, using the following rpm's to build tools/perf:
(OpenSUSE 11.4)

elfutils-devel-0.149-1.x86_64.rpm
elfutils-libs-0.149-1.x86_64.rpm
elfutils-libelf-0.149-1.x86_64.rpm 
elfutils-libelf-devel-0.149-1.x86_64.rpm
xz-libs-4.999.9-0.2.beta.20100401git.x86_64.rpm

I' using my own scsi driver - my-driver.

I do:
# perf record -fg fio my_fio_script
# perf annotate -l -k /usr/src/linux/vmlinux -s __lock_acquire
I'm getting:

[my_scsi_driver] with build id bee3bbdcaacc61223b70db093de47efffa26dbc9 not found, continuing without symbols

I see annotated __lock_acquire but if I run:
# perf annotate -l -k /my_driver_path/my_driver.ko -s my_function

I'm getting:
[kernel.kallsyms] with build id 08ba9c1ec15cb50d359428cacb0b490dee51e1a5 not found, continuing without symbols Segmentation fault

However, when doing:
# cat /proc/kallsyms|grep my_function

I'm getting:
ffffffffa0606b90 t   my_function	[my_driver]

I also built & ran perf code copied from kernel version 2.6.38 (had to disable "attr->sample_id_all" field usage in builtin-record.c & util/header.c to build on 2.6.37 as, unfortunatelly my_driver doesn't work on 2.6.38) with the same results.

When doing:
# perf report --verbose --dso='[my_driver]'

I see:
+     85.05%  fio  0x368f6          K [k] 0x368f6
+     14.95%  fio  0x7fffb9fff614   ! [.] 0x7fffb9fff614

Expanding any of these two, I'm getting many '+' prefixed hex addresses  instead of function names (kernel entry names) and I don't see any of the driver's api.
If I select to expand/zoom-in an api that doesn't have '+' and select "Zoom into fio DSO" it "Segmentation fault"

What can I do to annotate/resolve symbols for my_functions?

thanks,
John


      

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

end of thread, other threads:[~2011-03-17 18:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-14  9:51 Building perf failed on Linux/SPARC 陳韋任
2011-03-14 19:15 ` Arnaldo Carvalho de Melo
2011-03-15  3:16   ` 陳韋任
     [not found]     ` <8CB5FB7FBAFD274A8E92A53BBAFE339D0ADF79@039-SN1MPN1-003.039d.mgd.msft.net>
2011-03-15  8:20       ` 陳韋任
2011-03-15 10:08         ` Kumar Ranjit-B04060
2011-03-16  2:00           ` 陳韋任
2011-03-17 18:32   ` [kernel.kallsyms] with build id ... not found, continuing without symbols john smith

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