[Interest] Callgrind under Linux
Konstantin Tokarev
annulen at yandex.ru
Fri Mar 6 15:56:32 CET 2020
06.03.2020, 17:30, "Jérôme Godbout" <godboutj at amotus.ca>:
> Hi,
>
> one of my colleague is trying to start valgrind callgrind to profile a part of the application using Qt 5.12.7, latest Qt Creator with Ubuntu. the start command look like this:
>
> valgrind --tool=callgrind --instr-atstart=no ./OpM-3_DU_SW
>
> it did the macro for the start/stop and dump. Added the valgrind lib. But Valgrind seem to crash with the following error:
> vex amd64->IR: unhandled instruction bytes: 0xF 0xC7 0xF2 0xB9 0x1 0x0 0x0 0x0
> vex amd64->IR: REX=0 REX.W=0 REX.R=0 REX.X=0 REX.B=0
> vex amd64->IR: VEX=0 VEX.L=0 VEX.nVVVV=0x0 ESC=0F
> vex amd64->IR: PFX.66=0 PFX.F2=0 PFX.F3=0
> ==13393== valgrind: Unrecognised instruction at address 0x84d5c40.
> ==13393== at 0x84D5C40: qt_random_cpu(void*, long long) (immintrin.h:103)
> ==13393== by 0x84D6666: QRandomGenerator::SystemGenerator::generate(unsigned int*, unsigned int*) (qrandom.cpp:369)
>but how does one know what exactly is wrong!? The proint call stack seem legitimate to me.
Valgrind says that it cannot handle some instruction. Call stack points directly to place RDRAND intrinsics are used.
>We did find a closed issue about it: https://bugreports.qt.io/browse/QTBUG-62118
> But no solution or hint about the cause of this.
You can configure Qt with explicitly disable RDRAND, or use same hack as used in tst_qrandomgenerator.cpp, passing SkipHWRNG flag to qt_randomdevice_control.
--
Regards,
Konstantin
More information about the Interest
mailing list