Open bingxinliu opened 9 months ago
@bingxinliu If you can share out gmx
and loop1.perf
that you are passing to create_gcov
, I can investigate your failure.
@bingxinliu If you can share out
gmx
andloop1.perf
that you are passing tocreate_gcov
, I can investigate your failure.
@erozenfeld Hi, sorry for replying late, the log file is too large (~300MB) to share it via github, so I uploaded it to onedrive and shared it. The url is here and password is autofdo
if necessary. Really appreciate for your help. THX!
@bingxinliu It looks like your profile doesn't have events for binary with buildid 9e166341c96797559485bb5c2e656da4c9b4e078
:
/home/erozen/bin/perf buildid-list -i ./loop1.perf
a6243ce6e9e5f490e7107d9e428b097150e55bb2 [kernel.kallsyms]
fb6b031703ec138b7bd76acdb1c3372dafe45472 [vdso]
901c89cff01d23aa026a99b31bcacf240b96e332 /home/liubx/Development/codes/gromacs/gromacs-2023.2-original-src/build-original/lib/libgromacs.so.8.0.0
51657f818beb1ae70372216a99b7412b8a100a20 /usr/lib/x86_64-linux-gnu/libc.so.6
e845af0c38643152c9cc58dab8540e6f57677eb4 /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0
@bingxinliu Looks like most of the samples are in libgromacs.so.8.0.0
. Do you want to optimize gmx
or libgromacs.so.8.0.0
with AutoFDO?
@erozenfeld Thank you for your replying!
@bingxinliu Looks like most of the samples are in
libgromacs.so.8.0.0
. Do you want to optimizegmx
orlibgromacs.so.8.0.0
with AutoFDO?
I think gmx
depends on libgromacs
which is generated by the cmake option -DBUILD_SHARED_LIBS=ON
, so they are basically the same in my opinion. Does this mean that AutoFDO does not support profiling shared library?
@bingxinliu It looks like your profile doesn't have events for binary with buildid
9e166341c96797559485bb5c2e656da4c9b4e078
:/home/erozen/bin/perf buildid-list -i ./loop1.perf a6243ce6e9e5f490e7107d9e428b097150e55bb2 [kernel.kallsyms] fb6b031703ec138b7bd76acdb1c3372dafe45472 [vdso] 901c89cff01d23aa026a99b31bcacf240b96e332 /home/liubx/Development/codes/gromacs/gromacs-2023.2-original-src/build-original/lib/libgromacs.so.8.0.0 51657f818beb1ae70372216a99b7412b8a100a20 /usr/lib/x86_64-linux-gnu/libc.so.6 e845af0c38643152c9cc58dab8540e6f57677eb4 /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0
Another problem is that I did perf the gmx
as shown below. It should be ok to find the binary with buildid 9e166341c96797559485bb5c2e656da4c9b4e078
perf record -o ${PERF_PATH}/loop$1.perf \
-b -e br_inst_retired.near_taken:pp -- \
${GMX_PATH}/bin/gmx mdrun \
-resethway -npme 0 -notunepme -noconfout -nsteps 1000 -v -s bench.tpr \
> output.result$1
And the gmx
indeed has the same buildid. Maybe most of gmx
's code is just calling libgromacs
so that no event is tagged with gmx
. The problem may be caused by how I perf the program?
@bingxinliu Yes, it doesn't look like any events are associated with gmx
. All the work is done in libgromacs.so.8.0.0
. create_gcov
works on a per-binary basis. You probably want to optimize libgromacs.so.8.0.0
with AutoFDO since the work is done there. In that case you'll need to pass --binary=<path_to_libgromacs.so.8.0.0>
and then make sure that the resulting .gcov file is used during libgromacs.so.8.0.0
build.
Hi,
I compiled the Gromacs with "-Wl,--build-id" linking option and using perf to record perf.data, but create_gcov seems like can not find the binary with error message showing below:
The thing is that actually readelf could print correct build id as shown below:
Here is how I built Gromacs:
How I get the perf data:
Any ideas about this problem? Appreciate for any help, thanks a lot!