Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 317809

Summary: qt4 "-graphicssystem trace" support
Product: Gentoo Linux Reporter: Siarhei Siamashka <siarhei.siamashka>
Component: New packagesAssignee: Qt Bug Alias <qt>
Status: RESOLVED FIXED    
Severity: enhancement CC: realnc
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://trac.webkit.org/wiki/QtWebKitPerformanceUtilities
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: a hackish ebuild to provide trace graphicssystem (derived from qt-opengl)
a hackish patch for qt-assistant to provide qttracereplay tool
updated qt-gui

Description Siarhei Siamashka 2010-04-29 18:26:40 UTC
In Qt 4.6 a new graphicssystem called trace was introduced. It allows to record all drawing operations into a trace buffer, store it to disk. Later it can be replayed with the qttracereplay utility of Qt.

Gentoo currently does not have any ebuild for trace graphicssystem plugin and qttracereplay tool.

Reproducible: Always

Steps to Reproduce:
1. $ ./my-qt-app -graphicssystem trace
2. $ qttracereplay *.trace

Actual Results:  
$ ./my-qt-app -graphicssystem trace
Unable to load graphicssystem "trace"
$ qttracereplay *.trace
bash: qttracereplay: command not found

Expected Results:  
Trace is successfully recorded and played back

This trace/replay stuff is useful for doing profiling and performance optimizations.
Comment 1 Markos Chandras (RETIRED) gentoo-dev 2010-04-29 19:12:43 UTC
we can adjust the qt-gui live ebuilds to see how that will go

Comment 2 Markos Chandras (RETIRED) gentoo-dev 2010-04-30 10:13:28 UTC
Are you sure that trace exists on Qt 4.6?

* from configure script *
-graphicssystem <sys> Sets an alternate graphics system. Available options are:
                           raster - Software rasterizer
                           opengl - Rendering via OpenGL, Experimental!

There is no trace engine available on 4.6
Comment 3 Siarhei Siamashka 2010-04-30 12:33:38 UTC
Created attachment 229799 [details]
a hackish ebuild to provide trace graphicssystem (derived from qt-opengl)
Comment 4 Siarhei Siamashka 2010-04-30 12:34:20 UTC
Created attachment 229801 [details, diff]
a hackish patch for qt-assistant to provide qttracereplay tool
Comment 5 Siarhei Siamashka 2010-04-30 12:36:31 UTC
(In reply to comment #2)
> Are you sure that trace exists on Qt 4.6?

Yes, it exists. I have just attached the ugly hacks that I'm using now.

Of course I would prefer a clean out of the box solution, but I don't have a clear understanding about how all these qt ebuilds work.
Comment 6 Markos Chandras (RETIRED) gentoo-dev 2010-04-30 13:50:25 UTC
Created attachment 229803 [details]
updated qt-gui

Ah it exists as a separate module and can't me used as default engine. I see.

Please try the attached qt-gui ebuild with trace use flag enabled an let me know if it works for you.
Comment 7 Siarhei Siamashka 2010-05-01 15:36:35 UTC
(In reply to comment #6)
> Please try the attached qt-gui ebuild with trace use flag enabled an let me
> know if it works for you.

Thanks, it works fine. Now in order to get a complete trace feature support, also qttracereplay tool needs to be bundled somewhere.

BTW, this tool also allows to easily compare performance of different qt graphicssystems by playing back the traces (ex. "qttracereplay -graphicssystem raster sometrace.trace" vs. "qttracereplay sometrace.trace").
Comment 8 Markos Chandras (RETIRED) gentoo-dev 2010-05-01 18:21:50 UTC
Thanks a lot. Both ebuilds are now on tree. 

Reopen this bug if you have any issues 
Comment 9 Nikos Chantziaras 2010-05-02 13:03:40 UTC
Not sure what's going on, but qt-assistant can't be built now. emerge fails and log says:

tar xzpf /var/tmp/portage/x11-libs/qt-assistant-4.6.2-r1/distdir/qt-everywhere-opensource-src-4.6.2.tar.gz qt-everywhere-opensour
tar: qt-everywhere-opensource-src-4.6.2/tools/assistant: Not found in archive
tar: qt-everywhere-opensource-src-4.6.2/tools/pixeltool: Not found in archive
tar: qt-everywhere-opensource-src-4.6.2/tools/qdoc3: Not found in archive
tar: Exiting with failure status due to previous errors
Comment 10 Nikos Chantziaras 2010-05-02 13:06:01 UTC
Sorry, first line got truncated.  It's this command:

tar xzpf /var/tmp/portage/x11-libs/qt-assistant-4.6.2-r1/distdir/qt-everywhere-opensource-src-4.6.2.tar.gz qt-everywhere-opensource-src-4.6.2/configure qt-everywhere-opensource-src-4.6.2/LICENSE.GPL3 qt-everywhere-opensource-src-4.6.2/LICENSE.LGPL qt-everywhere-opensource-src-4.6.2/projects.pro qt-everywhere-opensource-src-4.6.2/src/qbase.pri qt-everywhere-opensource-src-4.6.2/src/qt_targets.pri qt-everywhere-opensource-src-4.6.2/src/qt_install.pri qt-everywhere-opensource-src-4.6.2/bin qt-everywhere-opensource-src-4.6.2/config.tests qt-everywhere-opensource-src-4.6.2/mkspecs qt-everywhere-opensource-src-4.6.2/qmake qt-everywhere-opensource-src-4.6.2/tools/assistant qt-everywhere-opensource-src-4.6.2/tools/pixeltool qt-everywhere-opensource-src-4.6.2/tools/qdoc3 qt-everywhere-opensource-src-4.6.2/tools/assistant qt-everywhere-opensource-src-4.6.2/tools/pixeltool qt-everywhere-opensource-src-4.6.2/tools/qdoc3 qt-everywhere-opensource-src-4.6.2/tools/ qt-everywhere-opensource-src-4.6.2/demos/ qt-everywhere-opensource-src-4.6.2/examples/ qt-everywhere-opensource-src-4.6.2/src/ qt-everywhere-opensource-src-4.6.2/include/ qt-everywhere-opensource-src-4.6.2/doc/
Comment 11 Markos Chandras (RETIRED) gentoo-dev 2010-05-02 19:18:04 UTC
http://bugs.gentoo.org/show_bug.cgi?id=318079