lkml.org 
[lkml]   [2018]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 4/6] perf version: Print the compiled-in status of libraries
From
Date


On 4/3/2018 12:47 AM, Arnaldo Carvalho de Melo wrote:
> Em Fri, Mar 30, 2018 at 05:27:14PM +0800, Jin Yao escreveu:
>> This patch checks the values passed by CFLAGS (-DHAVE_XXX) and then
>> print the status of libraries.
>>
>> For example, if HAVE_DWARF_SUPPORT is defined, that means the
>> library "dwarf" is compiled-in. The patch will print the status
>> "on" for this library otherwise it print the status "OFF".
>>
>> A new option '--build-options' created for 'perf version' supports
>> the printing of library status.
>>
>> For example:
>>
>> $ ./perf version --build-options
>> or
>> ./perf --version --build-options
>> or
>> ./perf -v --build-options
>>
>> perf version 4.13.rc5.g6727c5
>> dwarf: [ on ] # HAVE_DWARF_SUPPORT
>> dwarf_getlocations: [ on ] # HAVE_DWARF_GETLOCATIONS_SUPPORT
>> glibc: [ on ] # HAVE_GLIBC_SUPPORT
>> gtk2: [ on ] # HAVE_GTK2_SUPPORT
>> libaudit: [ OFF ] # HAVE_LIBAUDIT_SUPPORT
>
> Ok, while testing this I noticed the above, which may be distracting,
> i.e. on x86-64 and s/390 not having libaudit means nothing, it is not
> needed for anything.
>
> It is only needed for architectures where HAVE_SYSCALL_TABLE is not
> defined, that, btw, is not listed here, so I suggest that we stop
> printing this "libaudit [ OFF ]" line if HAVE_SYSCALL_TABLE is
> available, and also add a line for HAVE_SYSCALL_TABLE.
>
> Anyways, this can be done on top of this series, but please do a grep
> looking for other HAVE_* to fix, and we need to rename
> HAVE_SYSCALL_TABLE to HAVE_SYSCALL_TABLE_SUPPORT...
>
> - Arnaldo
>

Hi Arnaldo,

Thanks for the suggestions. Yes, some follow-up patches are needed.

1. Remove -DNO_LIBPERL and use -DHAVE_LIBPERL_SUPPORT in C code.

2. Remove -DNO_LIBPYTHON and use -DHAVE_LIBPYTHON_SUPPORT in C code.

3. Rename HAVE_SYSCALL_TABLE to HAVE_SYSCALL_TABLE_SUPPORT.

4. Don't print "libaudit [ OFF ]" line if HAVE_SYSCALL_TABLE_SUPPORT is
available and add a line for HAVE_SYSCALL_TABLE_SUPPORT.

I will do it in follow-up patch.

Thanks
Jin Yao

\
 
 \ /
  Last update: 2018-04-03 03:25    [W:0.898 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site