Profiling application with valgrind and Qt Creator



  • Hello everyone!
    I'm trying to profile my appliaction with Valgrind,
    Launching profiling function analizer, the analizer start correctly with this output

    ==1814== Callgrind, a call-graph generating cache profiler
    ==1814== Copyright (C) 2002-2015, and GNU GPL'd, by Josef Weidendorfer et al.
    ==1814== Using Valgrind-3.12.0.SVN and LibVEX; rerun with -h for copyright info
    ==1814== Command: /Users/mariomeloni/Develop/build/bin/btb
    ==1814== 
    --1814-- warning: L3 cache found, using its data for the LL simulation.
    ==1814== For interactive control, run 'callgrind_control -h'.
    --1814-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option
    --1814-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 2 times)
    --1814-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 4 times)
    --1814-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 8 times)
    --1814-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 16 times)
    

    But, the analysis get stuck for hours and nothing happen.
    I'm talking about an application with 200 c++ classes.

    Is this normal ?
    Any idea about it ?

    Thanks in advanced and sorry for my bad english ;)
    GG.



  • Hi all,

    Quite same experience on macOS 10.13.1 platform, seems valgring is not working at all:

    Profiling /Users/thierry/Dev/QuarkEmu/bin/QuarkEmuDebug.app/Contents/MacOS/QuarkEmuDebug
    ==60360== Callgrind, a call-graph generating cache profiler
    ==60360== Copyright (C) 2002-2017, and GNU GPL'd, by Josef Weidendorfer et al.
    ==60360== Using Valgrind-3.14.0.GIT and LibVEX; rerun with -h for copyright info
    ==60360== Command: /Users/thierry/Dev/QuarkEmu/bin/QuarkEmuDebug.app/Contents/MacOS/QuarkEmuDebug
    ==60360== 
    ==60360== For interactive control, run 'callgrind_control -h'.
    --60360-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option
    --60360-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 2 times)
    --60360-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 4 times)
    UNKNOWN workq_ops option 128
    ==60360== valgrind: Unrecognised instruction at address 0x104085ecf.
    ==60360==    at 0x104085ECF: _dispatch_kq_init (in /usr/lib/system/libdispatch.dylib)
    ==60360==    by 0x104083E87: _dispatch_client_callout (in /usr/lib/system/libdispatch.dylib)
    ==60360==    by 0x104083E3A: dispatch_once_f (in /usr/lib/system/libdispatch.dylib)
    ==60360==    by 0x1040A1BA9: _dispatch_kq_poll (in /usr/lib/system/libdispatch.dylib)
    ==60360==    by 0x1040A1839: _dispatch_kq_drain (in /usr/lib/system/libdispatch.dylib)
    ==60360==    by 0x1040A0C07: _dispatch_kq_unote_update (in /usr/lib/system/libdispatch.dylib)
    ==60360==    by 0x10409BF37: _dispatch_source_refs_register (in /usr/lib/system/libdispatch.dylib)
    ==60360==    by 0x10409C061: _dispatch_source_finalize_activation (in /usr/lib/system/libdispatch.dylib)
    ==60360==    by 0x10409508D: _dispatch_queue_resume_finalize_activation (in /usr/lib/system/libdispatch.dylib)
    ==60360==    by 0x1044384F6: _notify_lib_init (in /usr/lib/system/libsystem_notify.dylib)
    ==60360==    by 0x104438B89: notify_register_dispatch (in /usr/lib/system/libsystem_notify.dylib)
    ==60360==    by 0x104E03CA7: CFUserNotificationCreate (in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
    ==60360== Your program just tried to execute an instruction that Valgrind
    ==60360== did not recognise.  There are two possible reasons for this.
    ==60360== 1. Your program has a bug and erroneously jumped to a non-code
    ==60360==    location.  If you are running Memcheck and you just saw a
    ==60360==    warning about a bad jump, it's probably your program's fault.
    ==60360== 2. The instruction is legitimate but Valgrind doesn't handle it,
    ==60360==    i.e. it's Valgrind's fault.  If you think this is the case or
    ==60360==    you are not sure, please let us know and we'll try to fix it.
    ==60360== Either way, Valgrind will now raise a SIGILL signal which will
    ==60360== probably kill your program.
    ==60360== 
    ==60360== Process terminating with default action of signal 4 (SIGILL)
    ==60360==  Illegal opcode at address 0x104085ECF
    ==60360==    at 0x104085ECF: _dispatch_kq_init (in /usr/lib/system/libdispatch.dylib)
    ==60360==    by 0x104083E87: _dispatch_client_callout (in /usr/lib/system/libdispatch.dylib)
    ==60360==    by 0x104083E3A: dispatch_once_f (in /usr/lib/system/libdispatch.dylib)
    ==60360==    by 0x1040A1BA9: _dispatch_kq_poll (in /usr/lib/system/libdispatch.dylib)
    ==60360==    by 0x1040A1839: _dispatch_kq_drain (in /usr/lib/system/libdispatch.dylib)
    ==60360==    by 0x1040A0C07: _dispatch_kq_unote_update (in /usr/lib/system/libdispatch.dylib)
    ==60360==    by 0x10409BF37: _dispatch_source_refs_register (in /usr/lib/system/libdispatch.dylib)
    ==60360==    by 0x10409C061: _dispatch_source_finalize_activation (in /usr/lib/system/libdispatch.dylib)
    ==60360==    by 0x10409508D: _dispatch_queue_resume_finalize_activation (in /usr/lib/system/libdispatch.dylib)
    ==60360==    by 0x1044384F6: _notify_lib_init (in /usr/lib/system/libsystem_notify.dylib)
    ==60360==    by 0x104438B89: notify_register_dispatch (in /usr/lib/system/libsystem_notify.dylib)
    ==60360==    by 0x104E03CA7: CFUserNotificationCreate (in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation)
    ==60360== 
    ==60360== Events    : Ir
    ==60360== Collected : 254070349
    ==60360== 
    ==60360== I   refs:      254,070,349
    Le programme s'est terminé subitement.
    ** Le processus a planté **
    Analyzing finished.
    


  • @quadbyte: There is QTCREATORBUG-19004 which looks like your problem. Please see there for more information about the problem and the possible solution (upgrading valgrind)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.