Re: [PATCH 2/2] perf buildid-cache: Add test for PE executable

2021-02-24 Thread Nicholas Fraser
On 2021-02-24 8:43 a.m., Jiri Olsa wrote: > On Fri, Feb 19, 2021 at 11:10:34AM -0500, Nicholas Fraser wrote: >> +# the build id must be rearranged into a GUID >> +id=`objcopy -O binary --only-section=.buildid $1 /dev/stdout | \ >> +cut -c 33-48 | hexdum

Re: [PATCH 2/2] perf buildid-cache: Add test for PE executable

2021-02-24 Thread Jiri Olsa
On Fri, Feb 19, 2021 at 11:10:34AM -0500, Nicholas Fraser wrote: SNIP > +if ! which wine > /dev/null; then > +echo "WARNING: wine not found. PE binaries will not be run." > +run_pe=0 > +fi > + > ex_md5=$(mktemp /tmp/perf.ex.MD5.XXX) > ex_sha1=$(mktemp /tmp/perf.ex.SHA1.XXX) > +ex_pe=$(d

[PATCH 2/2] perf buildid-cache: Add test for PE executable

2021-02-19 Thread Nicholas Fraser
This builds on the previous changes to tests/shell/buildid.sh, adding tests for a PE file. It adds it to the build-id cache manually and, if Wine is available, runs it under "perf record" and verifies that it was added automatically. If wine is not installed, only warnings are printed; the test ca