Bug 84141 - [Qt] Instrument the WebKit source
Summary: [Qt] Instrument the WebKit source
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 420+
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks: 78701
  Show dependency treegraph
 
Reported: 2012-04-17 03:27 PDT by Langó László
Modified: 2014-02-03 03:20 PST (History)
3 users (show)

See Also:


Attachments
first draft patch (8.55 KB, patch)
2012-04-17 03:27 PDT, Langó László
no flags Details | Formatted Diff | Diff
first draft patch (updated to ToT) (4.56 KB, patch)
2012-05-23 07:21 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff
first draft patch (updated to ToT) (8.52 KB, patch)
2012-05-24 05:33 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff
first draft patch (updated to ToT) (8.57 KB, patch)
2012-05-30 00:53 PDT, Langó László
no flags Details | Formatted Diff | Diff
rebased patch to ToT (4.59 KB, patch)
2012-10-16 05:27 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff
rebased patch to ToT (8.61 KB, patch)
2012-10-16 09:27 PDT, Zoltan Arvai
no flags Details | Formatted Diff | Diff
rebased patch to ToT (8.69 KB, patch)
2012-10-17 05:14 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff
rebased patch to ToT (4.43 KB, patch)
2012-10-17 06:47 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff
rebased patch to ToT (8.41 KB, patch)
2012-10-17 06:50 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff
rebased patch to ToT (8.51 KB, patch)
2012-10-18 08:10 PDT, Zoltan Arvai
no flags Details | Formatted Diff | Diff
rebased patch to ToT (8.55 KB, patch)
2012-10-24 01:00 PDT, Zoltan Arvai
no flags Details | Formatted Diff | Diff
rebased patch to ToT (8.54 KB, patch)
2012-11-21 02:43 PST, Zoltan Arvai
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Langó László 2012-04-17 03:27:55 PDT
Created attachment 137507 [details]
first draft patch

Add Instrument build to the build system to make method coverage data for further process.
Comment 1 Csaba Osztrogonác 2012-05-23 07:21:51 PDT
Created attachment 143566 [details]
first draft patch (updated to ToT)
Comment 2 Csaba Osztrogonác 2012-05-24 05:33:01 PDT
Created attachment 143795 [details]
first draft patch (updated to ToT)
Comment 3 Csaba Osztrogonác 2012-05-24 05:36:25 PDT
Comment on attachment 143795 [details]
first draft patch (updated to ToT)

View in context: https://bugs.webkit.org/attachment.cgi?id=143795&action=review

> Source/WebKit/qt/WebCoreSupport/Instrumenter.cpp:49
> +        testcaseFileStream = fopen((QCoreApplication::applicationDirPath().toStdString() + "/../methodcoverage/" + testcaseName).c_str(), "wb");

The dir should be as the other script expects in https://bugs.webkit.org/show_bug.cgi?id=84330
methodcoverage --> methodcoverage/results

Additionally we should create this directory if it doesn't exist.
Comment 4 Langó László 2012-05-30 00:53:59 PDT
Created attachment 144738 [details]
first draft patch (updated to ToT)

results patch is corrected too, and the warning is solved
Comment 5 Csaba Osztrogonác 2012-10-16 05:27:26 PDT
Created attachment 168929 [details]
rebased patch to ToT
Comment 6 Zoltan Arvai 2012-10-16 09:27:01 PDT
Created attachment 168960 [details]
rebased patch to ToT 

Instrumenter.cpp and Instrumenter.h was missing from the previous patch.
Comment 7 Csaba Osztrogonác 2012-10-17 05:14:56 PDT
Created attachment 169163 [details]
rebased patch to ToT

But I still get the following linking error:
---------------------------------------------
.obj/release-shared/DumpRenderTreeQt.o: In function `WebCore::DumpRenderTree::DumpRenderTree()':
DumpRenderTreeQt.cpp:(.text._ZN7WebCore14DumpRenderTreeC2Ev+0x101): undefined reference to `Instrumenter::init()'
.obj/release-shared/DumpRenderTreeQt.o: In function `WebCore::DumpRenderTree::~DumpRenderTree()':
DumpRenderTreeQt.cpp:(.text._ZN7WebCore14DumpRenderTreeD2Ev+0x37): undefined reference to `Instrumenter::destroy()'
.obj/release-shared/DumpRenderTreeQt.o: In function `WebCore::DumpRenderTree::processLine(QString const&)':
DumpRenderTreeQt.cpp:(.text._ZN7WebCore14DumpRenderTree11processLineERK7QString+0x1bb): undefined reference to `Instrumenter::start(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
.obj/release-shared/DumpRenderTreeQt.o: In function `WebCore::DumpRenderTree::dump()':
DumpRenderTreeQt.cpp:(.text._ZN7WebCore14DumpRenderTree4dumpEv+0x3e1): undefined reference to `Instrumenter::end()'
collect2: ld returned 1 exit status
make[3]: *** [../../../bin/DumpRenderTree] Error 1


Instrumenter::init() and Instrumenter::destroy() are in the libwebkit1.a,
but they aren't in the libQtWebKitWidgets.so for some reason ...
Comment 8 Csaba Osztrogonác 2012-10-17 05:19:56 PDT
Here is the linking command of libQtWebKitWidgets.so:
------------------------------------------------------
g++ -Wl,--gc-sections -Wl,--no-undefined -Wl,--no-undefined -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/Qt5/Qt-5.0.0-r38/lib -shared -Wl,-Bsymbolic-functions -Wl,-soname,libQtWebKitWidgets.so.5 -o libQtWebKitWidgets.so.5.0.0   -ldl -L/usr/local/Trolltech/Qt5/Qt-5.0.0-r38/lib -lQtWidgets -lQtNetwork -lQtGui -lQtCore -lpthread -Wl,-whole-archive -lWebKit1 -Wl,-no-whole-archive -L/storage/WebKit/WebKitBuild/Release/Source/WebKit/release -Wl,-whole-archive -lWebKit2 -Wl,-no-whole-archive -L/storage/WebKit/WebKitBuild/Release/Source/WebKit2/release -Wl,-whole-archive -lWebCore -Wl,-no-whole-archive -L/storage/WebKit/WebKitBuild/Release/Source/WebCore/release -lz -lXrender -ljpeg -lpng -Wl,-whole-archive -lANGLE -Wl,-no-whole-archive -L/storage/WebKit/WebKitBuild/Release/Source/ThirdParty/ANGLE/release -Wl,-whole-archive -lJavaScriptCore -Wl,-no-whole-archive -L/storage/WebKit/WebKitBuild/Release/Source/JavaScriptCore/release -Wl,-whole-archive -lWTF -Wl,-no-whole-archive -L/storage/WebKit/WebKitBuild/Release/Source/WTF/release -licui18n -licuuc -licudata -lQtQuick -L/storage/qt5/qtdeclarative/lib -L/usr/local/Trolltech/Qt5/Qt-5.0.0-r38/lib -lQtOpenGL -lQtPrintSupport -lQtQml -lQtWidgets -lQtLocation -lQtSql -lQtNetwork -lQtGui -lQtSensors -lQtCore -lpthread -lGL -lXext -lm -lX11 -lxslt -lgio-2.0 -lgstapp-0.10 -lgstinterfaces-0.10 -lgstpbutils-0.10 -pthread -lgstvideo-0.10 -lgstbase-0.10 -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lxml2 -lgthread-2.0 -lrt -lglib-2.0

It contains ... -Wl,-whole-archive -lWebKit1 -Wl,-no-whole-archive ...
How is it possible if the ld doesn't add everything to the so?
Comment 9 Csaba Osztrogonác 2012-10-17 06:47:43 PDT
Created attachment 169173 [details]
rebased patch to ToT

I moved the instrumenter from WebKit1 to DRT and it works now.
Comment 10 Csaba Osztrogonác 2012-10-17 06:50:25 PDT
Created attachment 169174 [details]
rebased patch to ToT
Comment 11 Zoltan Arvai 2012-10-18 08:10:18 PDT
Created attachment 169413 [details]
rebased patch to ToT
Comment 12 Zoltan Arvai 2012-10-24 01:00:17 PDT
Created attachment 170339 [details]
rebased patch to ToT
Comment 13 Zoltan Arvai 2012-11-21 02:43:43 PST
Created attachment 175391 [details]
rebased patch to ToT

No more hard coded qt path
Comment 14 Jocelyn Turcotte 2014-02-03 03:20:36 PST
=== Bulk closing of Qt bugs ===

If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary.

If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.