disable PDB of specific modules on linux

50 views
Skip to first unread message

Shanfeng Cheng

unread,
Dec 1, 2014, 12:15:13 PM12/1/14
to chromium-dev
Since debugging on linux is slow due to the large size of PDB, is there any option for us to exclude PDB for some of the modules? For example, we can exclude the PDB information of the webcore module if we are only debugging the browser-level code. 


Stephen Cheng

Nico Weber

unread,
Dec 1, 2014, 12:21:50 PM12/1/14
to Shanfeng Cheng, chromium-dev
https://code.google.com/p/chromium/wiki/LinuxFasterBuilds#Build_WebKit_without_debug_symbols I haven't tried this, but looking at WebKit/Source/config.gyp it might still work.

Nico

ps: (PDB is a Visual Studio-specific file format that's not used on Linux.)

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Shanfeng Cheng

unread,
Dec 1, 2014, 8:43:31 PM12/1/14
to Nico Weber, chromium-dev
I did that and I wonder how to check if the debug information of webcore has been removed. The main executable file is still 600+ MB, same as before. I tried debugging it and the speed has no noticeable improvement. 


Stephen Cheng

Shanfeng Cheng

unread,
Dec 2, 2014, 2:26:47 AM12/2/14
to Nico Weber, chromium-dev
In config.gyp, there is a comment saying that it is for gcc only. I guess it is not valid for clang which we are currently using?


Shanfeng Cheng
 
From: Nico Weber
Date: 2014-12-01 11:20
Subject: Re: [chromium-dev] disable PDB of specific modules on linux

Nico Weber

unread,
Dec 2, 2014, 2:33:10 AM12/2/14
to Shanfeng Cheng, chromium-dev
That comment looks incorrect.

You can build with ninja -v and check that `-g` isn't passed to the compiler for blink object files. Or you can look at the generated ninja files for blink (e.g. out/Release/obj/third_party/WebKit/Source/core/webcore_html.ninja) and check that -g isn't passed in cflags.

Shanfeng Cheng

unread,
Dec 2, 2014, 2:52:00 AM12/2/14
to Nico Weber, chromium-dev
The -g flag has been successfully removed. But I compared the folder out/Debug/obj/third_party/WebKit/Source/core between two builds with different settings. The lib*.a files under that folder have similar file sizes.  

Nico Weber

unread,
Dec 2, 2014, 12:25:31 PM12/2/14
to Shanfeng Cheng, chromium-dev
Do the generated cflags when you don't disable symbols include -gsplit-dwarf? If so, the debug info is written into a separate .dwo file, not into the .o files – hence, the size of the .o files is expected to be roughly identical with and without debug info in both cases.

Shanfeng Cheng

unread,
Dec 3, 2014, 3:06:47 PM12/3/14
to Nico Weber, chromium-dev
Yes. It has -gsplit-dwarf. However, both builds have many smaller dwo files and they are about the same size. 

Nico Weber

unread,
Dec 3, 2014, 3:36:38 PM12/3/14
to Shanfeng Cheng, chromium-dev
If you're doing both builds in the same build directory, the build with debug info will write .dwo files and the build without debug info won't use those but it won't delete them either. If you remove the .dwo files for blink and rebuild without debug info, do they come back?

Shanfeng Cheng

unread,
Dec 4, 2014, 1:23:48 PM12/4/14
to Nico Weber, chromium-dev
I found the problem. I had to remove the option -gsplit-dwarf as well in order to completely get rid of the .dwo files. If only -g is removed while -gsplit-dwarf stays, it still generates the debugging information. 
Reply all
Reply to author
Forward
0 new messages