[PATCH V4] gprofng: a new GNU profiler

Vladimir Mezentsev vladimir.mezentsev@oracle.com
Fri Dec 10 17:31:00 GMT 2021
Hi Nick,

On 12/10/21 01:38, Nick Clifton wrote:
> Hi Vladimir,
>
>> For x86_64/i686, gprofng should be built twice to support profiling for
>> both 32-bit and 64-bit applications:
>>    PREFIX=<YOUR_INSTALL_DIR>
>>    configure --enable-shared --prefix=$PREFIX --libdir=$PREFIX/lib64 
>> && make && make install
>>    configure --enable-shared --prefix=$PREFIX CC='gcc -m32' CXX='g++ 
>> -m32' \
>>           --target=i686-pc-linux-gnu --disable-gprofng-tools && make 
>> && make install
>>
>> For ARM:
>>    configure --enable-shared --prefix=$PREFIX && make install
>
> Am I correct in thinking that gprofng only supports x86/x86_64 and ARM ?

yes, it currently on x86/x86_64 and aarch64.


>
> To me this is a concern as the intention of the binutils project is to
> support as wide a range of architectures as possible.
>
> Is it simple to add other architectures ?  What work needs to be done ?

We utilize disassembler() from libopcodes and several functions from 
libbfd which are already cross platform.
The rest of porting is stack unwinding and hardware counter profiling 
(It is in binutils-gdb.git/gprofng/libcollector).
We will start writing a few page porting guide.

Thank you,
-Vladimir

>
> Cheers
>   Nick
>


More information about the Binutils mailing list