Difference between revisions of "PGO Related Bugs"

From CDOT Wiki
Jump to: navigation, search
(Project Tasks)
(0.3 Release)
 
(121 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Project Name ==
+
== <font color="Peru">Project Name </font>==
  
 
PGO Related Bugs
 
PGO Related Bugs
  
== Project Description ==
+
== <font color="Peru">Project Description </font>==
  
 
Firefox crashes or experiences bugs after creating PGO builds on Windows.  The focus of this project is to determine what is causing these crashes or bugs and either patch/fix them or find solutions to allow for the optimizations without incurring the problems.
 
Firefox crashes or experiences bugs after creating PGO builds on Windows.  The focus of this project is to determine what is causing these crashes or bugs and either patch/fix them or find solutions to allow for the optimizations without incurring the problems.
  
== Project Leader(s) ==
+
As of Oct 2nd:<br />
 +
Profiling Firefox to increase the number of functions optimized in the PGO build of Firefox.
  
[[User:cbishop2|Chris Bishop]]
+
== <font color="Peru">Project Leader(s) </font>==
  
== Project Contributor(s) ==
+
*[[User:cbishop2|Chris Bishop]]
  
- None so far but that will change.
+
== <font color="Peru">Project Contributor(s) </font>==
  
NOTE: only Project Leader(s) should add names here.  You '''can’t''' add your own name to the Contributor list.
+
Contributors are needed for help on profiling Firefox to improve PGO on Firefox.
  
== Project Tasks ==
+
What contributions are needed?
 +
 
 +
*What should be profiled?
 +
*A write up on steps to produce profile.
 +
*Creating scripts to execute profile steps.
 +
<br />
 +
{| border="1"
 +
!style="width:auto"|Name
 +
!style="width:25px"|
 +
!style="width:auto"|Contribution
 +
|-
 +
|Chris Bishop ( Example )
 +
|
 +
|Script to open and close Firefox.
 +
|-
 +
|}
 +
<br /><br />
 +
*Need some bash scripting help.
 +
*I'm on IRC as chrisBee
 +
 
 +
{| border="1"
 +
!style="width:auto"|Name
 +
!style="width:25px"|
 +
!style="width:auto"|Script Contribution
 +
|-
 +
|[[User:cdpatel1|Chinmay Patel]]
 +
|
 +
|Created a small script to search and replace a piece of text in a file.
 +
|-
 +
|}
 +
 
 +
== <font color="Peru">Project Tasks </font>==
 
<table style="width: 100%;" class="standard-table" cellborder=1 border=1 cellpadding=3 cellspacing=0>
 
<table style="width: 100%;" class="standard-table" cellborder=1 border=1 cellpadding=3 cellspacing=0>
 
     <th style="width: 15%;">Task</th>
 
     <th style="width: 15%;">Task</th>
Line 24: Line 56:
 
     <th style="width: 5%;">Status</th>
 
     <th style="width: 5%;">Status</th>
 
     <th style="width: 8%;">Target</th>
 
     <th style="width: 8%;">Target</th>
     <th style="width: 25%;">Link(s)</th>
+
     <th style="width: 25%;">Link(s) or Notes</th>
  
 
     <tr>
 
     <tr>
Line 37: Line 69:
 
         <td>'''Reproduce PGO Bugs or Crashes'''</td>
 
         <td>'''Reproduce PGO Bugs or Crashes'''</td>
 
         <td>I need to reproduce the bugs or crashes other people were experiencing with their pgo builds.</td>
 
         <td>I need to reproduce the bugs or crashes other people were experiencing with their pgo builds.</td>
         <td style="color: white; background-color: Orange; text-align: center; font-weight: bold; font-size: bigger">High</td>
+
         <td style="background-color: Orange; text-align: center; font-weight: bold; font-size: bigger">High</td>
         <!-- color green when done --><td style="background-color: white; text-align: center; font-weight: bold;">Not Started</td>
+
         <!-- color green when done --><td style="background-color: green; text-align: center; font-weight: bold;">Done</td>
 
         <td style="background-color: YellowGreen; text-align: center; font-weight: bold;">0.1 R</td>
 
         <td style="background-color: YellowGreen; text-align: center; font-weight: bold;">0.1 R</td>
         <td></td>
+
         <td>Unable to reproduce. Focusing on profiling Firefox. [http://dee132.blogspot.com/2008/10/change-of-direction.html Blog Post]</td>
 
     </tr>
 
     </tr>
 
     <tr>
 
     <tr>
 
         <td>'''Compile Firefox PGO Tests'''</td>
 
         <td>'''Compile Firefox PGO Tests'''</td>
 
         <td>Compile Firefox with VS 2005 and Vista SDK and compile with VS 2008 w/o Vista SDK.</td>
 
         <td>Compile Firefox with VS 2005 and Vista SDK and compile with VS 2008 w/o Vista SDK.</td>
         <td style="background-color: Orange; text-align: center; font-weight: bold; font-size: bigger">low</td>
+
         <td style="background-color: Orange; text-align: center; font-weight: bold; font-size: bigger">Low</td>
 
         <!-- color green when done --><td style="background-color: white; text-align: center; font-weight: bold;">Not Started</td>
 
         <!-- color green when done --><td style="background-color: white; text-align: center; font-weight: bold;">Not Started</td>
 
         <td style="background-color: YellowGreen; text-align: center; font-weight: bold;">0.3 R</td>
 
         <td style="background-color: YellowGreen; text-align: center; font-weight: bold;">0.3 R</td>
 
         <td></td>
 
         <td></td>
 +
    </tr>
 +
    <tr>
 +
        <td>'''Determine 0.1 Release'''</td>
 +
        <td>I need to determine what I'll be releasing for the 0.1 Release.</td>
 +
        <td style="background-color: Orange; text-align: center; font-weight: bold; font-size: bigger">High</td>
 +
        <!-- color green when done --><td style="background-color: green; text-align: center; font-weight: bold;">Done</td>
 +
        <td style="background-color: YellowGreen; text-align: center; font-weight: bold;">Sept 28th, 2008</td>
 +
        <td></td>
 +
    </tr>
 +
    <tr>
 +
        <td>'''Scenario Scripts'''</td>
 +
        <td>I need a script that will build multiple PGO builds in different directories using different profiling scenarios.</td>
 +
        <td style="background-color: Orange; text-align: center; font-weight: bold; font-size: bigger">High</td>
 +
        <!-- color green when done --><td style="background-color: green; text-align: center; font-weight: bold;">Done</td>
 +
        <td style="background-color: YellowGreen; text-align: center; font-weight: bold;">Oct 24th, 2008</td>
 +
        <td>I need some help from contributors to help me accomplish this. **Update** Thanks to Chinmay and Dave Humphrey I was able to create this script.</td>
 +
    </tr>
 +
    <tr>
 +
        <td>'''Create SQLite Upstream Bug'''</td>
 +
        <td>I have determined the pgo bug is actually with SQLite and it needs to be added to the upstream for it to be worked on.</td>
 +
        <td style="background-color: Orange; text-align: center; font-weight: bold; font-size: bigger">High</td>
 +
        <!-- color green when done --><td style="background-color: white; text-align: center; font-weight: bold;">On Going</td>
 +
        <td style="background-color: YellowGreen; text-align: center; font-weight: bold;">Oct 24th, 2008</td>
 +
        <td>Looking into how to actual do this</td>
 +
    </tr>
 +
    <tr>
 +
        <th colspan="6">0.2 Release</th>
 +
    </tr>
 +
    <tr>
 +
        <td>'''Setup Test Environment'''</td>
 +
        <td>I need to setup a test environment to duplicate the testing done on Thunderbird.</td>
 +
        <td style="background-color: Orange; text-align: center; font-weight: bold; font-size: bigger">High</td>
 +
        <!-- color green when done --><td style="background-color: green; text-align: center; font-weight: bold;">Done</td>
 +
        <td style="background-color: YellowGreen; text-align: center; font-weight: bold;">Nov 4th, 2008</td>
 +
        <td>I have this VM setup but I am not using yet since my XP OS that is not on a VM is much faster.</td>
 
     </tr>
 
     </tr>
 
</table>
 
</table>
  
== Project Details ==
+
== <font color="Peru">Project Details </font>==
 +
 
 +
=== Conversations ===
  
Details to come...
+
{|
 +
|width="15px"|
 +
|December 6th
 +
|Ted Mielczarek
 +
|-
 +
|
 +
|colspan="2"|
 +
I told Ted about how a large number of pgc (profile data) files  were in a folder that gets deleted before the pgc files get used to optimize Thunderbird. It turns out that this folder gets clobbered to make sure if some one rebuilt their try after removing a component that it would not still be there.  Ted suggest adding a flag that <code>ifndef MOZ_PROFILE_USE</code> then go ahead and clobber it otherwise don't.<br /><br />
 +
That is only one part of it.  The pgc files need to be merged into their corresponding pgd (program database) files but the script that does this only looks in one directory.  I think I can just tell it to look in both locations.  The <code>pgomerge.py</code> does not return errors for files not found.<br /><br />
 +
Ted also said I should create another bug about this - how components can't be PGO'd on Win32.
 +
|}
  
== Project News ==
+
=== PGO Details ===
  
=== September ===
+
{|
----
+
|width="15px"|
 +
|[[PGO_Build_Details| Details]]
 +
|-
 +
|
 +
|[[PGO_Related_Bugs/TB_Details|Thunderbird PGO Details]]
 +
|}
 +
 
 +
==== Thunderbird ====
 +
{|
 +
|width="15px"|
 +
|[[PGO_Build_Details/TB-Addrbook| Address Book enabled with PGO]]<br/>
 +
Turned on speed optimizations for the Address Book module. 
 +
|}
 +
 
 +
=== Testing Scripts ===
 +
{|
 +
|width="15px"|
 +
|
 +
 
 +
{|class="collapsible collapsed" style="border-style:solid;border-width:thin;border-color:black"
 +
!align="left" style="background-color:#FF9933; font-weight:bold;border-style:solid;border-width:thin;padding: 2px 2px 2px 2px;"|The scripts I am using for running tests against my builds ( Oct 2nd, 2008 )
 +
|-
 +
|
 +
<code>#!/bin/sh</code><br/>
 +
<span style="color:green;">''####### the .mozconfig file to use for this build''</span><br />
 +
<code>export MOZCONFIG=/f/mozilla/.mozconfigPGO</code><br />
 +
<span style="color:green;">''####### the subdirectory trunk holds my src files''</span><br />
 +
<code>cd trunk</code><br />
 +
<span style="color:green;">''####### time the profile build and output stdout and stderr to files that are timestamped''</span><br />
 +
<code>time make -f client.mk profiledbuild 1> /i/mozilla/pgo-output-`date +%s`.txt 2> /i/mozilla/pgo-errors-`date +%s`.txt''</code><br />
 +
<span style="color:green;">''####### after the build is completed done run the xpcshell tests and output stdout and stderr to file that are timestamped''</span><br />
 +
<code>make check 1> /i/mozilla/pgo-check-output-`date +%s`.txt 2> /i/mozilla/pgo-check-errors-`date +%s`.txt</code><br />
 +
<span style="color:green;">''####### change to the objdir directory then to the mochitest directory''</span><br />
 +
<code>cd /i/mozilla/ff-pgo/_tests/testing/mochitest</code><br />
 +
<span style="color:green;">''####### run the mochitest, run test right away, close the browser when done, log all output to a timestamped file''</span><br />
 +
<code>python runtests.py --autorun --close-when-done --log-file=/i/mozilla/pgo-mochitest-`date +%s`.log --file-level=DEBUG</code>
 +
|}
 +
<br />
 +
{|class="collapsible collapsed" style="border-style:solid;border-width:thin;border-color:black"
 +
!align="left" style="background-color:#FF9933; font-weight:bold;border-style:solid;border-width:thin;padding: 2px 2px 2px 2px;"|Here is the .mozconfig file ( Oct 2nd, 2008 )
 +
|-
 +
|
 +
<code>. $topsrcdir/browser/config/mozconfig</code><br />
 +
<code>mk_add_options MOZ_OBJDIR=/i/mozilla/ff-pgo</code><br />
 +
<code>mk_add_options MOZ_MAKE_FLAGS=-j5</code><br />
 +
<span style="color:green;">''####### this is the script to run after the first build to gather profile data''</span><br />
 +
<code>mk_add_options PROFILE_GEN_SCRIPT="sh /f/mozilla/pgo.sh"</code><br />
 +
<code>ac_add_options --disable-vista-sdk-requirements</code><br />
 +
<span style="color:green;">''####### this has to be enabled to perform the mochitests''</span><br />
 +
<code>ac_add_options --enable-tests</code><br />
 +
<code>ac_add_options --disable-debug</code><br />
 +
<code>ac_add_options --disable-accessibility</code>
 +
|}
 +
<br />
 +
{|class="collapsible collapsed" style="border-style:solid;border-width:thin;border-color:black"
 +
!align="left" style="background-color:#FF9933; font-weight:bold;border-style:solid;border-width:thin;padding: 2px 2px 2px 2px;"|Here is the script the profile build runs to gather profile data ( Oct 2nd, 2008 )
 +
|-
 +
|
 +
<pre>
 +
#!/bin/sh
 +
export NO_EM_RESTART=1
 +
mkdir $OBJDIR/_profileprofile
 +
cd /i/mozilla/ff-pgo/_tests/testing/mochitest
 +
python runtests.py --autorun --close-when-done --log-file=/i/mozilla/pgo-profile-mochitest-`date +%s`.log --file-level=DEBUG
 +
</pre>
 +
|}
 +
 
 +
 
 +
|}
 +
 
 +
=== Related Bugs ===
 +
 
 +
{|
 +
|width="15px"|
 +
|-
 +
|
 +
| Profiledbuild doesn't work on comm-central - [https://bugzilla.mozilla.org/show_bug.cgi?id=448515 448515]
 +
|-
 +
|
 +
|Figure out why building jemalloc breaks with PGO enabled - [https://bugzilla.mozilla.org/show_bug.cgi?id=419470 419470]
 +
|-
 +
|
 +
|sort out PGO-triggered bugs - [https://bugzilla.mozilla.org/show_bug.cgi?id=419893 419893]
 +
|-
 +
|
 +
|win32 mozilla-central weirdness with PGO - [https://bugzilla.mozilla.org/show_bug.cgi?id=437002 437002]
 +
|-
 +
|
 +
|To enable PGO on Thunderbird a module in the Mozilla core needs to have PGO disabled - [https://bugzilla.mozilla.org/show_bug.cgi?id=465592 465592] - Resolved
 +
|-
 +
|
 +
|Components cannot be PGO'd on Windows - [https://bugzilla.mozilla.org/show_bug.cgi?id=468285 468285]
 +
|-
 +
|
 +
|js3250!1.pgc remains in dist/bin during a PGO build  - [https://bugzilla.mozilla.org/show_bug.cgi?id=467271 467271]
 +
|}
 +
 
 +
=== Patches ===
 +
{|
 +
|width="15px"|
 +
|-
 +
|
 +
|Here is the [[PGO_Related_Bugs/Patches#465592|patch]] for bug [https://bugzilla.mozilla.org/show_bug.cgi?id=465592 465592].
 +
|-
 +
|
 +
|Here is the proposed [[PGO_Related_Bugs/Patches#468285 | patches]] for bug [https://bugzilla.mozilla.org/show_bug.cgi?id=468285 468285].
 +
|}
  
 +
=== Releases ===
 +
{|
 +
|width="15px"|
 +
|
 +
==== <span style="color:SaddleBrown;">0.1 Release</span> ====
  
==== Met with Ted Mielczarek ( Sept 15th, 2008 ) ====
 
 
{|
 
{|
|&nbsp;&nbsp;&nbsp;
+
|width="15px"|
|On Tuesday after the conference was over I met with Ted and we discussed how I can get started on the PGO Project.
+
|
 +
{|
 +
!width="25px" |
 +
!
 +
|-
 +
|colspan="2"|'''Reproduce bug(s)'''
 +
|-
 +
|
 +
|Was able to reproduce bug for sqlite pgo.
 +
|-
 +
|colspan="2"|'''Document how to reproduce bug(s).'''
 +
|-
 +
|
 +
|To enable PGO for sqlite a line must be commented in a make file.<br />
 +
in path/to/src/db/sqlite/src/Makefile.in<br /> add a hash to the line <code>NO_PROFILE_GUIDED_OPTIMIZE = 1</code> <br />should look like <code>#NO_PROFILE_GUIDED_OPTIMIZE = 1</code><br />
 +
The build firefox with <code>make -f client.mk profiledbuild</code><br />
 +
in the .mozconfig file you'll need an extra parameter <code>mk_add_options PROFILE_GEN_SCRIPT="sh script/to/run.sh"</code><br />
 +
<em>My Script file</em> has the following:
 +
<pre>export NO_EM_RESTART=1 #this means 'do not restart for any reason' during automation we do not want any restarting
 +
 
 +
mkdir $OBJDIR/_profileprofile
 +
cd $OBJDIR/_tests/testing/mochitest
 +
python runtests.py --test-path=browser/ --autorun --close-when-done</pre>
 +
 
 +
|-
 +
|colspan="2"|'''Hone in on cause of bug(s).'''
 +
|-
 +
|
 +
|Turns out the bug is in the sqlite3.c file.  I can reproduce the error when creating a stand alone sqlite application and enabling PGO on the application.
 +
|-
 +
|colspan="2"|'''Running xpcshell and Mochitest against PGO build.'''
 +
|-
 +
|
 +
|Since firefox right out crashes I am unable to run Mochitests but the xpcshell tests do run until they hit the storage tests.<br />
 +
{|class="collapsible collapsed" style="border-style:solid;border-width:thin;border-color:black"
 +
!align="left" style="background-color:#FF9933; font-weight:bold;border-style:solid;border-width:thin;padding: 2px 2px 2px 2px;"|SQLite PGO Errors in xpcshell ( Oct 16th, 2008 )
 +
|-
 +
|<pre>TEST-UNEXPECTED-FAIL | ../../_tests/xpcshell-simple/test_storage/unit/test_bug-365166.js | test failed, see log
 +
../../_tests/xpcshell-simple/test_storage/unit/test_bug-365166.js.log:
 +
>>>>>>>
 +
*** Storage Tests: Trying to close!
 +
 
 +
<<<<<<<
 +
TEST-UNEXPECTED-FAIL | ../../_tests/xpcshell-simple/test_storage/unit/test_bug-393952.js | test failed, see log
 +
../../_tests/xpcshell-simple/test_storage/unit/test_bug-393952.js.log:
 +
>>>>>>>
 +
*** Storage Tests: Trying to close!
 +
 
 +
<<<<<<<
 +
TEST-UNEXPECTED-FAIL | ../../_tests/xpcshell-simple/test_storage/unit/test_bug-429521.js | test failed, see log
 +
../../_tests/xpcshell-simple/test_storage/unit/test_bug-429521.js.log:
 +
>>>>>>>
 +
*** Storage Tests: Trying to close!
 +
 
 +
<<<<<<<
 +
TEST-UNEXPECTED-FAIL | ../../_tests/xpcshell-simple/test_storage/unit/test_bug-444233.js | test failed, see log
 +
../../_tests/xpcshell-simple/test_storage/unit/test_bug-444233.js.log:
 +
>>>>>>>
 +
*** Storage Tests: Trying to close!
 +
 
 +
<<<<<<<
 +
TEST-UNEXPECTED-FAIL | ../../_tests/xpcshell-simple/test_storage/unit/test_connection_executeAsync.js | test failed, see log
 +
../../_tests/xpcshell-simple/test_storage/unit/test_connection_executeAsync.js.log:
 +
>>>>>>>
 +
*** Storage Tests: Trying to close!
 +
 
 +
<<<<<<<
 +
TEST-UNEXPECTED-FAIL | ../../_tests/xpcshell-simple/test_storage/unit/test_like.js | test failed, see log
 +
../../_tests/xpcshell-simple/test_storage/unit/test_like.js.log:
 +
>>>>>>>
 +
*** Storage Tests: Trying to close!
 +
 
 +
<<<<<<<
 +
TEST-UNEXPECTED-FAIL | ../../_tests/xpcshell-simple/test_storage/unit/test_like_escape.js | test failed, see log
 +
../../_tests/xpcshell-simple/test_storage/unit/test_like_escape.js.log:
 +
>>>>>>>
 +
*** Storage Tests: Trying to close!
 +
 
 +
<<<<<<<
 +
make[2]: *** [check] Interrupt
 +
make[1]: *** [check] Interrupt
 +
make: *** [check] Interrupt</pre>
 +
|}
 +
|
 +
|-
 +
|colspan="2"|'''Create strategy for profiling Firefox to improve performance. '''
 +
|-
 +
|
 +
|I tried different approaches to profiling for Firefox to improve its performance but I was not able to help it at all.  I have concluded that the existing script of opening and closing the browser is more than enough for profiling.  The browser is rendered using the same components to render and load web pages this means profiling the loading and rendering of the browser will optimize the rendering and loading of web pages.
 +
|-
 +
|colspan="2"|'''Deliverable'''
 +
|-
 +
|
 +
|I have updated the bug [https://bugzilla.mozilla.org/show_bug.cgi?id=419893 419893] with how to reproduce the bug, a text file of the errors, a zip file with the source code for my test app to produce pgo errors with sqlite as a stand alone app.
 
|}
 
|}
  
==== Created First Build ( Sept 17th, 2008 ) ====
+
|}
 +
 
 +
==== <span style="color:SaddleBrown;">0.2 Release</span> ====
 +
{|
 +
|width="15px"|
 +
|
 +
 
 
{|
 
{|
|&nbsp;&nbsp;&nbsp;
+
!width="25px" |
|I walked through the Mozilla documentation for how to build Firefox. I started [http://developer.mozilla.org/en/Mozilla_Source_Code_(Mercurial) here] with getting the source code and continued until I received errorsHumph and Ted on IRC helped me sort it out and I successfully built Firefox.
+
!
 +
|-
 +
|colspan="2"|'''Setup Testing Environment'''
 +
|-
 +
|
 +
|Created Windows 2003 Server VM - but I am still using my faster Windows XP OS since it is not a VM.  The test environment will be used to verify performance data once testing of PGO begins.  Either in 0.3 or beyond.
 +
|-
 +
|colspan="2"|'''Compile Thunderbird with PGO'''
 +
|-
 +
|
 +
|I successfully compiled Thunderbird with PGO.  It required modifying a file. I blogged about it [http://dee132.blogspot.com/2008/11/success.html here].
 +
|-
 +
|colspan="2"|'''Compile Steps'''
 +
|-
 +
|
 +
|I also have the steps to compile Thunderbird with PGO [[PGO_Related_Bugs/Thunderbird|here]].
 +
|-
 +
|colspan="2"|'''Contribute to Existing Bug'''
 +
|-
 +
|
 +
| The bug '''Profiledbuild doesn't work on comm-central''' [https://bugzilla.mozilla.org/show_bug.cgi?id=448515 448515] has been re-opened and I have posted my success results on this bug.
 +
|-
 +
|colspan="2"|'''Add PGO to one module'''
 +
|-
 +
|
 +
|This will be pushed back to 0.3 Release
 
|}
 
|}
  
==== Created Project Page ( Sept 18th, 2008 ) ====
+
<!-- end of inside 0.2 release -->
 +
|}
 +
 
 +
==== <span style="color:SaddleBrown;">0.3 Release</span> ====
 
{|
 
{|
|&nbsp;&nbsp;&nbsp;
+
|width="15px"|
|I created this page for the project and added it to the list of Projects.
+
|
 +
{|
 +
!width="25px" |
 +
!
 +
|-
 +
|colspan="2"|'''Patch to enable PGO for Thunderbird on Windows'''
 +
|-
 +
|
 +
|I created a new [https://bugzilla.mozilla.org/show_bug.cgi?id=465592 bug] for allow PGO for Thunderbird on Windows and my patch has made it into the mozilla-core.<br/>
 +
This is the [[PGO_Related_Bugs/Patches | patch]] that landed.
 +
|-
 +
|colspan="2"|'''Add PGO to one module'''
 +
|-
 +
|
 +
|It turns out that by default each module is optimized for size if using PGO.  The problem that arose from this was the profile data was being collect but not used.  The profile data was getting deleted at the beginning of the build cycle.
 +
|-
 +
|colspan="2"|'''Create a new bug for deleted profile data'''
 +
|-
 +
|
 +
|
 +
Problem 1 is the profile data in the dist/bin/components folder is getting deleted. Problem 2 is even if the profile data wasn't getting deleted the pgomerge.py script is not looking for profile data in the dist/bin/components folder anyways.  This means that any component that are profiled are not getting optimized.<br />
 +
Here are the [[PGO_Related_Bugs/Patches#468285|patches]] I'm proposing.<br/>
 +
I created a new [https://bugzilla.mozilla.org/show_bug.cgi?id=468285 bug] for this problem.
 +
|-
 +
|colspan="2"|'''Details of optimizing Thunderbird'''
 +
|-
 +
|
 +
|Using the proposed patches 74 objects were profiled and 69 were optimized.  Here are the [[PGO_Related_Bugs/TB_Details|details]].
 +
|} <!-- end 0.3 release -->
 
|}
 
|}
  
==== Working with PGO ( Sept 19th, 2008 ) ====
+
|}<!-- end of table indent -->
 +
 
 +
=== Errors ===
 
{|
 
{|
|&nbsp;&nbsp;&nbsp;
+
|width="15px"|
|Working with some old assignments in c and c++ I tried to compile these programs with pgo options but the linker failed on both projects. Also tried from inside of Visual Studio 2008 but received compilation errors.
+
|
 +
*Build Environment:
 +
**Windows XP (32-bit)
 +
**Visual Studio 2008
 +
**Vista SDK
 +
 
 +
{|class="collapsible collapsed" style="border-style:solid;border-width:thin;border-color:black"
 +
!align="left" style="background-color:#FF9933; font-weight:bold;border-style:solid;border-width:thin;padding: 2px 2px 2px 2px;"|Firefox Compilation Errors ( Sept 26th, 2008 )
 +
|-
 +
|<pre>e:\mozilla\trunk\modules\lcms\src\cmscgats.c(875) : fatal error C1001: An internal error has occurred in the compiler.
 +
(compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c[0x511953E5:0x00000008]', line 182)
 +
To work around this problem, try simplifying or changing the program near the locations listed above.
 +
Please choose the Technical Support command on the Visual C++  
 +
Help menu, or open the Technical Support help file for more information
 +
 
 +
LINK : fatal error LNK1000: Internal error during IMAGE::BuildImage
 +
 
 +
  Version 9.00.21022.08
 +
 
 +
  ExceptionCode            = C0000005
 +
  ExceptionFlags          = 00000000
 +
  ExceptionAddress        = 511953E5 (51030000) "e:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\c2.dll"
 +
  NumberParameters        = 00000002
 +
  ExceptionInformation[ 0] = 00000000
 +
  ExceptionInformation[ 1] = 00000008
 +
 
 +
CONTEXT:
 +
  Eax    = 00000000  Esp    = 0012ED18
 +
  Ebx    = 02D5D215  Ebp    = 0012ED2C
 +
  Ecx    = 02D96601  Esi    = 02D5D280
 +
  Edx    = 02DAAE12  Edi    = 00000305
 +
  Eip    = 511953E5  EFlags = 00010246
 +
  SegCs  = 0000001B  SegDs  = 00000023
 +
  SegSs  = 00000023  SegEs  = 00000023
 +
  SegFs  = 0000003B  SegGs  = 00000000
 +
  Dr0    = 00000000  Dr3    = 00000000
 +
  Dr1    = 00000000  Dr6    = 00000000
 +
  Dr2    = 00000000  Dr7    = 00000000
 +
</pre>
 
|}
 
|}
  
==== Compiled an old assignment with PGO ( Sept 20th, 2008 ) ====
+
 
 +
{|class="collapsible collapsed" style="border-style:solid;border-width:thin;border-color:black"
 +
!align="left" style="background-color:#FF9933; font-weight:bold;border-style:solid;border-width:thin;padding: 2px 2px 2px 2px;"|Firefox Compilation Errors ( Sept 22th, 2008 )
 +
|-
 +
|<pre>make[6]: *** [mozlcms.dll] Error 232
 +
make[6]: *** Deleting file `mozlcms.dll'
 +
make[5]: *** [libs] Error 2
 +
make[4]: *** [libs_tier_external] Error 2
 +
make[3]: *** [tier_external] Error 2
 +
make[2]: *** [default] Error 2
 +
make[1]: *** [build] Error 2
 +
make: *** [profiledbuild] Error 2
 +
</pre>
 +
|}
 +
<br />
 +
 
 +
|} <!-- end of table indent -->
 +
 
 +
Thunderbird PGO Errors<br />
 +
The lcms module breaks pgo. [[PGO_Related_Bugs/TB_PGO_Errors|Found Here]]
 +
 
 +
=== Performance ===
 
{|
 
{|
|&nbsp;&nbsp;&nbsp;
+
|width="15px"|
|My previous attempts at compiling the old assignment failed because I was including object files that were compiled with a different compiler. Oops.  I was successful at creating a PGO build with an old assignment.  <br />
+
|
The program loads 15,000 random records from a text file into 4 tables each using a different method for storage and searching.
+
 
 +
Last updated: October 11th, 2008
 +
==== [[PGO_Pref_data_here| PGO Performance data ]]====
 +
 
 +
 
 +
{|class="collapsible collapsed" style="border-style:solid;border-width:thin;border-color:black"
 +
!align="left" style="background-color:#FF9933; font-weight:bold;border-style:solid;border-width:thin;padding: 2px 2px 2px 2px;"| PGO Build Results ( Sept 20th, 2008 )
 +
|-
 +
|The program loads 15,000 random records from a text file into 4 tables each using a different method for storage and searching.
 
<ol type="1">
 
<ol type="1">
 
  <li>Simple Table: Uses an array and a linear search.
 
  <li>Simple Table: Uses an array and a linear search.
Line 126: Line 539:
 
|3.6x
 
|3.6x
 
|} <!-- End result Table -->
 
|} <!-- End result Table -->
<br />
+
 
I think I will look at the optimization data to figure out how it optimized my application.  I also need to build an optimized version of Firefox and run it.  I know it has bugs or crashes, that is the point of this project so I also need to figure out how to compile and debug Firefox in Visual Studio.
+
|}
 +
 
 +
|} <!-- end of table indent -->
 +
 
 +
<!--
 +
{|class="collapsible collapsed" style="border-style:solid;border-width:thin;border-color:#FFCC66"
 +
!align="left" style="background-color:#CCFFFF;"|
 +
|-
 +
|
 
|}
 
|}
 +
-->
 +
 +
== <font color="Peru">Project News </font>==
  
==== Firefox and PGO ( Sept 22th, 2008 ) ====
+
=== December 2008===
 
{|
 
{|
|&nbsp;&nbsp;&nbsp;
+
!width="100px"|Date
|I built Firefox with the command <code>make -f client.mk profiledbuild</code>. This first compiles Firefox with extra code that watches the activity in Firefox and creates profile data to optimize Firefox. After Firefox is compiled it runs a script that loads the browser. While the browser it is outputting profile data about the activity. After the browser is closed it compiles again but this time using the profile data to optimize Firefox to run faster on Windows.<br /> <br />
+
!width="15px"|
During the compiling of Firefox I received a lot of warnings. Then Minefield loaded and after typing in an URL an Assertion happened. Firefox closed and continue to compile using the profile data but it failed with errors.  I tried again this time just closing the browser after it started but again it failed to compile with the profile data.<br /><br />
+
!Comments
I'll post the output and error logs online.
+
|-valign="top"
Here are some of the errors.
+
|style="color:green;font-weight:bold" |Dec 8nd, 2008
<pre>make[6]: *** [mozlcms.dll] Error 232
+
|
make[6]: *** Deleting file `mozlcms.dll'
+
|I successfully optimized the components but I broke something small. I [http://dee132.blogspot.com/2008/12/thunderbird-components-getting.html blogged] about it.
make[5]: *** [libs] Error 2
+
|-valign="top"
make[4]: *** [libs_tier_external] Error 2
+
|style="color:green;font-weight:bold" |Dec 6nd, 2008
make[3]: *** [tier_external] Error 2
+
|
make[2]: *** [default] Error 2
+
|I posted a new bug about components not getting optimized for Windows. This is the [https://bugzilla.mozilla.org/show_bug.cgi?id=468285 bug].
make[1]: *** [build] Error 2
+
|-valign="top"
make: *** [profiledbuild] Error 2
+
|style="color:green;font-weight:bold" |Dec 6nd, 2008
</pre>
+
|
 
+
|After talking with Ted Mielczarek on IRC I have found out why the files I'm profiling are not getting merged into the optimized build. [[PGO_Related_Bugs#Conversations|Here]] is the conversation.
Here is link to build [http://zenit.senecac.on.ca/wiki/imgs/Sept22build-.zip output].
+
|-valign="top"
 +
|style="color:green;font-weight:bold" |Dec 6nd, 2008
 +
|
 +
|My patch has made into mozilla-central.  Here is the [http://dee132.blogspot.com/2008/12/patch-landed.html blog] posting.
 +
|-valign="top"
 +
|style="color:green;font-weight:bold" |Dec 5nd, 2008
 +
|
 +
|My patch has been reviewed.  It needed some changes but was approved. This is the [https://bugzilla.mozilla.org/show_bug.cgi?id=465592 bug].
 +
|-valign="top"
 +
|style="color:green;font-weight:bold" |Dec 5nd, 2008
 +
|
 +
|Still trying to get the address book optimized.  Discovered that all the modules are getting optimized for size by default.  I [http://dee132.blogspot.com/2008/12/optimizing-thunderbird-address-book_05.html blogged] about it.
 +
|-valign="top"
 +
|style="color:green;font-weight:bold" |Dec 3nd, 2008
 +
|
 +
|Added speed optimizations to the address book module in Thunderbird.  This library gets linked into the mail.dll.
 +
|-valign="top"
 +
|style="color:green;font-weight:bold" |Dec 2nd, 2008
 +
|
 +
|I got a patch up that will disable pgo for the mozlcms module when it is not linked into the xul.dll.
 
|}
 
|}
  
==== PGO build with no debug or tests ( Sept 24th, 2008 ) ====
+
=== November 2008===
 +
----
 
{|
 
{|
|&nbsp;&nbsp;&nbsp;
+
!width="100px"|Date
|I Compiled Firefox with disable debug and tests and I did not receive any assertions but the build still failed to compile. :(
+
!width="15px"|
 +
!Comments
 +
|-valign="top"
 +
|style="color:green;font-weight:bold" |Nov 24th, 2008
 +
|
 +
|I've been looking at the Thunderbird Makefiles.  I'm trying to understand how the build process works.  I [http://dee132.blogspot.com/2008/11/understanding-thunderbird-build-process.html blogged] about it.
 +
|-valign="top"
 +
|style="color:green;font-weight:bold" |Nov 18th, 2008
 +
|
 +
|I created a new [https://bugzilla.mozilla.org/show_bug.cgi?id=465592 bug] to get input on how to enable PGO for Thunderbird without modifying the Mozilla core files. Blog is [http://dee132.blogspot.com/2008/11/lets-start-converation.html here].
 +
|-valign="top"
 +
|style="color:green;font-weight:bold" |Nov 12th, 2008
 +
|
 +
|I have updated my 0.2 Release.
 +
|-valign="top"
 +
|style="color:green;font-weight:bold" |Nov 12th, 2008
 +
|
 +
|Nomis who is working on enabling PGO for TB on Mac is having different errors than me.  He is posting to the same bug as I am.
 +
|-valign="top"
 +
|style="color:green;font-weight:bold" |Nov 12th, 2008
 +
|
 +
|A closed [https://bugzilla.mozilla.org/show_bug.cgi?id=448515 bug] for PGO on Thunderbird has been re-opened. I am posting to it with new information and findings.
 +
|-valign="top"
 +
|style="color:green;font-weight:bold" |Nov 7th, 2008
 +
|
 +
|I posted results from using PGO.
 +
|-valign="top"
 +
|style="color:green;font-weight:bold" |Nov 7th, 2008
 +
|
 +
|I successfully compiled Thunderbird with PGO enabled.  I had to disable PGO for the mozlcms.dll.
 +
|-valign="top"
 +
|style="color:green;font-weight:bold" |Nov 4th, 2008
 +
|
 +
|Made change to the client.mk file for Thunderbird and compiled it with PGO enable.  I received a compile error.
 +
|-valign="top"
 +
|style="color:green;font-weight:bold" |Nov 1st, 2008
 +
|
 +
|Installed Windows 2003 for creating a testing environment.
 
|}
 
|}
  
==== Compile with VS 2005 Instead ( Sept 26th, 2008 ) ====
+
=== October 2008 ===
 +
----
 
{|
 
{|
|&nbsp;&nbsp;&nbsp;
+
!width="100px"|Date
|mconner and dbaron on the #developers on irc://moznet.org suggested I try to compile the profile build using Visual Studio 2005. My other build environment is XP (32bit), VS 2008 and Vista SDK. For testing purposes I should check if VS 2005 and Vista SDK compile then VS 2008 by itself. I'll probably use VirtualBox to make it easier.
+
!width="15px"|
 +
!Comments
 +
|-valign="top"
 +
|style="color:green;font-weight:bold" |Oct 28th, 2008
 +
|
 +
|Focusing on adding PGO to Thunderbird.  Built Thunderbird from source.
 +
|-valign="top"
 +
|style="color:green;font-weight:bold" |Oct 17th, 2008
 +
|
 +
|I have written up my 0.1 Release and have blogged about it.
 +
|-valign="top"
 +
|style="color:green;font-weight:bold" |Oct 16th, 2008
 +
|
 +
|After compiling Firefox with sqlite pgo enabled I was able to reproduce the crash as reported on the [https://bugzilla.mozilla.org/show_bug.cgi?id=419893 bug].  I also received errors in xpcshell which I posted to the [https://bugzilla.mozilla.org/show_bug.cgi?id=419893 bug] on bugzilla. I also created a test application for sqlite and found it crashed when compiled with PGO as a stand alone application.
 +
|-valign="top"
 +
|style="color:green;font-weight:bold" |Oct 14th, 2008
 +
|
 +
|Through the contribution of a fellow student I was able to create a script to automate multiple PGO Builds.
 +
|-valign="top"
 +
|style="color:green;font-weight:bold" |Oct 11th, 2008
 +
|
 +
|I checked my performance tests again this time including a pgo build with no profiling and Google Maps was 45% on both Minefields. Regardless of the profiling.
  
The actual error to my compiling with VS 2008 is found here.
+
|-valign="top"
 +
|style="color:green;font-weight:bold" |Oct 10th, 2008
 +
|
 +
|Updated the contributions section for help with creating bash shell scripts.
  
<pre>e:\mozilla\trunk\modules\lcms\src\cmscgats.c(875) : fatal error C1001: An internal error has occurred in the compiler.
+
|-valign="top"
(compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c[0x511953E5:0x00000008]', line 182)
+
|style="color:green;font-weight:bold" |Oct 10th, 2008
  To work around this problem, try simplifying or changing the program near the locations listed above.
+
|
Please choose the Technical Support command on the Visual C++
+
|Made a pgo performance chart. Google Maps was 45% faster in my pgo build after I profiled the site.
Help menu, or open the Technical Support help file for more information
 
  
LINK : fatal error LNK1000: Internal error during IMAGE::BuildImage
+
|-valign="top"
 +
|style="color:green;font-weight:bold" |Oct 8th, 2008
 +
|
 +
|Still receiving 35 failed tests even when I have no windows open and am not at the computer.
 +
|-valign="top"
 +
|style="color:green;font-weight:bold" |Oct 8th, 2008
 +
|
 +
|Ted mentioned on IRC that the 35 failed tests may of happened because I was moving my mouse during the tests.  Which I was. I'm going to try the tests again.
 +
|-valign="top"
 +
|style="color:green;font-weight:bold" |Oct 7th, 2008
 +
|
 +
|Using pgomgr I am able to see what profiling data has been collected.
 +
|-valign="top"
 +
|style="color:green;font-weight:bold" |Oct 4th, 2008
 +
|
 +
|A build of Firefox without PGO resulted in 35 failed Tests in Mochitest.  Xpcshell passed just fine.  At this time the tree is closed so I cannot get the latest bug free version.
 +
|-valign="top"
 +
|style="color:green;font-weight:bold" |Oct 2nd, 2008
 +
|
 +
|After talking with Ted and Dave Humphrey I am going to focus my project on increasing the profiling of Firefox to increase its speed.<br />
 +
I am also enabling the modules that have PGO disable and running the xpcshell and Mochitests on them to determine if they are still broken or if they are now working.
 +
|}
  
  Version 9.00.21022.08
+
=== September 2008 ===
 +
----
  
  ExceptionCode            = C0000005
+
{|
  ExceptionFlags          = 00000000
+
!width="100px"|Date
  ExceptionAddress        = 511953E5 (51030000) "e:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\c2.dll"
+
!width="15px"|
  NumberParameters        = 00000002
+
!Comments
  ExceptionInformation[ 0] = 00000000
+
|-
  ExceptionInformation[ 1] = 00000008
+
|style="color:green;font-weight:bold" | Sept 30th, 2008
 
+
|
CONTEXT:
+
|Failed to reproduce bugs. I followed Ted's suggestions on my blog but still not experiencing any problems with my pgo build.
  Eax    = 00000000 Esp    = 0012ED18
+
|-
  Ebx    = 02D5D215  Ebp    = 0012ED2C
+
|style="color:green;font-weight:bold" | Sept 28th, 2008
  Ecx    = 02D96601  Esi    = 02D5D280
+
|
  Edx    = 02DAAE12  Edi    = 00000305
+
|Ted pointed me in the right direction on how to reproduce the PGO bugs.  His post is [http://dee132.blogspot.com/2008/09/successful-pgo-build.html?showComment=1222626180000#c5457576464993100116 here].
  Eip    = 511953E5 EFlags = 00010246
+
|-
  SegCs  = 0000001B  SegDs  = 00000023
+
|style="color:green;font-weight:bold" | Sept 26th, 2008
  SegSs  = 00000023  SegEs  = 00000023
+
|
  SegFs  = 0000003B  SegGs  = 00000000
+
|Successfully compiled Firefox with PGO using Visual Studio 2005 compiler. Tests and debug are disabled.
  Dr0    = 00000000  Dr3    = 00000000
+
|-
  Dr1    = 00000000  Dr6    = 00000000
+
|style="color:green;font-weight:bold"|Sept 26th, 2008
  Dr2    = 00000000  Dr7    = 00000000
+
|
</pre>
+
|On IRC some guys suggested compiling with Visual Studio 2005 instead.
|}
+
|-
 
+
|style="color:green;font-weight:bold"|Sept 24th, 2008
{|class="prettytable collapsible collapsed"
+
|
!Always displayed header
+
|Attempted to compile with debug and test disabled. Still Failed.
 +
|-
 +
|style="color:green;font-weight:bold"|Sept 22th, 2008
 +
|
 +
|Failed to compile Firefox with PGO on Visual Studio 2008.
 +
|-
 +
|style="color:green;font-weight:bold"|Sept 20th, 2008
 +
|
 +
|Successfully compiled one old assignment using PGO in Visual Studio. Results in Project Details.
 +
|-
 +
|style="color:green;font-weight:bold"|Sept 19th, 2008
 +
|
 +
|Tried to compile some old assignments using PGO in Visual Studio. Two assignments failed.
 +
|-
 +
|style="color:green;font-weight:bold"|Sept 18th, 2008
 +
|
 +
|Created this Project Page.
 +
|-
 +
|style="color:green;font-weight:bold"|Sept 17th, 2008
 +
|
 +
|Created First Build of Firefox.
 
|-
 
|-
|Initially hidden text.
+
|style="color:green;font-weight:bold"|Sept 15th, 2008
 +
|
 +
|Met with Ted Mielczarek and discuss PGO Project.
 
|}
 
|}

Latest revision as of 22:26, 9 December 2008

Project Name

PGO Related Bugs

Project Description

Firefox crashes or experiences bugs after creating PGO builds on Windows. The focus of this project is to determine what is causing these crashes or bugs and either patch/fix them or find solutions to allow for the optimizations without incurring the problems.

As of Oct 2nd:
Profiling Firefox to increase the number of functions optimized in the PGO build of Firefox.

Project Leader(s)

Project Contributor(s)

Contributors are needed for help on profiling Firefox to improve PGO on Firefox.

What contributions are needed?

  • What should be profiled?
  • A write up on steps to produce profile.
  • Creating scripts to execute profile steps.


Name Contribution
Chris Bishop ( Example ) Script to open and close Firefox.



  • Need some bash scripting help.
  • I'm on IRC as chrisBee
Name Script Contribution
Chinmay Patel Created a small script to search and replace a piece of text in a file.

Project Tasks

Task Details Priority Status Target Link(s) or Notes
Compile Firefox PGO Compile the trunk of Firefox using make -f client.mk profiledbuild. High Done 0.1 R
Reproduce PGO Bugs or Crashes I need to reproduce the bugs or crashes other people were experiencing with their pgo builds. High Done 0.1 R Unable to reproduce. Focusing on profiling Firefox. Blog Post
Compile Firefox PGO Tests Compile Firefox with VS 2005 and Vista SDK and compile with VS 2008 w/o Vista SDK. Low Not Started 0.3 R
Determine 0.1 Release I need to determine what I'll be releasing for the 0.1 Release. High Done Sept 28th, 2008
Scenario Scripts I need a script that will build multiple PGO builds in different directories using different profiling scenarios. High Done Oct 24th, 2008 I need some help from contributors to help me accomplish this. **Update** Thanks to Chinmay and Dave Humphrey I was able to create this script.
Create SQLite Upstream Bug I have determined the pgo bug is actually with SQLite and it needs to be added to the upstream for it to be worked on. High On Going Oct 24th, 2008 Looking into how to actual do this
0.2 Release
Setup Test Environment I need to setup a test environment to duplicate the testing done on Thunderbird. High Done Nov 4th, 2008 I have this VM setup but I am not using yet since my XP OS that is not on a VM is much faster.

Project Details

Conversations

December 6th Ted Mielczarek

I told Ted about how a large number of pgc (profile data) files were in a folder that gets deleted before the pgc files get used to optimize Thunderbird. It turns out that this folder gets clobbered to make sure if some one rebuilt their try after removing a component that it would not still be there. Ted suggest adding a flag that ifndef MOZ_PROFILE_USE then go ahead and clobber it otherwise don't.

That is only one part of it. The pgc files need to be merged into their corresponding pgd (program database) files but the script that does this only looks in one directory. I think I can just tell it to look in both locations. The pgomerge.py does not return errors for files not found.

Ted also said I should create another bug about this - how components can't be PGO'd on Win32.

PGO Details

Details
Thunderbird PGO Details

Thunderbird

Address Book enabled with PGO

Turned on speed optimizations for the Address Book module.

Testing Scripts




Related Bugs

Profiledbuild doesn't work on comm-central - 448515
Figure out why building jemalloc breaks with PGO enabled - 419470
sort out PGO-triggered bugs - 419893
win32 mozilla-central weirdness with PGO - 437002
To enable PGO on Thunderbird a module in the Mozilla core needs to have PGO disabled - 465592 - Resolved
Components cannot be PGO'd on Windows - 468285
js3250!1.pgc remains in dist/bin during a PGO build - 467271

Patches

Here is the patch for bug 465592.
Here is the proposed patches for bug 468285.

Releases

0.1 Release

Reproduce bug(s)
Was able to reproduce bug for sqlite pgo.
Document how to reproduce bug(s).
To enable PGO for sqlite a line must be commented in a make file.

in path/to/src/db/sqlite/src/Makefile.in
add a hash to the line NO_PROFILE_GUIDED_OPTIMIZE = 1
should look like #NO_PROFILE_GUIDED_OPTIMIZE = 1
The build firefox with make -f client.mk profiledbuild
in the .mozconfig file you'll need an extra parameter mk_add_options PROFILE_GEN_SCRIPT="sh script/to/run.sh"
My Script file has the following:

export NO_EM_RESTART=1 #this means 'do not restart for any reason' during automation we do not want any restarting

mkdir $OBJDIR/_profileprofile 
cd $OBJDIR/_tests/testing/mochitest
python runtests.py --test-path=browser/ --autorun --close-when-done
Hone in on cause of bug(s).
Turns out the bug is in the sqlite3.c file. I can reproduce the error when creating a stand alone sqlite application and enabling PGO on the application.
Running xpcshell and Mochitest against PGO build.
Since firefox right out crashes I am unable to run Mochitests but the xpcshell tests do run until they hit the storage tests.
Create strategy for profiling Firefox to improve performance.
I tried different approaches to profiling for Firefox to improve its performance but I was not able to help it at all. I have concluded that the existing script of opening and closing the browser is more than enough for profiling. The browser is rendered using the same components to render and load web pages this means profiling the loading and rendering of the browser will optimize the rendering and loading of web pages.
Deliverable
I have updated the bug 419893 with how to reproduce the bug, a text file of the errors, a zip file with the source code for my test app to produce pgo errors with sqlite as a stand alone app.

0.2 Release

Setup Testing Environment
Created Windows 2003 Server VM - but I am still using my faster Windows XP OS since it is not a VM. The test environment will be used to verify performance data once testing of PGO begins. Either in 0.3 or beyond.
Compile Thunderbird with PGO
I successfully compiled Thunderbird with PGO. It required modifying a file. I blogged about it here.
Compile Steps
I also have the steps to compile Thunderbird with PGO here.
Contribute to Existing Bug
The bug Profiledbuild doesn't work on comm-central 448515 has been re-opened and I have posted my success results on this bug.
Add PGO to one module
This will be pushed back to 0.3 Release

0.3 Release

Patch to enable PGO for Thunderbird on Windows
I created a new bug for allow PGO for Thunderbird on Windows and my patch has made it into the mozilla-core.

This is the patch that landed.

Add PGO to one module
It turns out that by default each module is optimized for size if using PGO. The problem that arose from this was the profile data was being collect but not used. The profile data was getting deleted at the beginning of the build cycle.
Create a new bug for deleted profile data

Problem 1 is the profile data in the dist/bin/components folder is getting deleted. Problem 2 is even if the profile data wasn't getting deleted the pgomerge.py script is not looking for profile data in the dist/bin/components folder anyways. This means that any component that are profiled are not getting optimized.
Here are the patches I'm proposing.
I created a new bug for this problem.

Details of optimizing Thunderbird
Using the proposed patches 74 objects were profiled and 69 were optimized. Here are the details.

Errors

  • Build Environment:
    • Windows XP (32-bit)
    • Visual Studio 2008
    • Vista SDK



Thunderbird PGO Errors
The lcms module breaks pgo. Found Here

Performance

Last updated: October 11th, 2008

PGO Performance data


Project News

December 2008

Date Comments
Dec 8nd, 2008 I successfully optimized the components but I broke something small. I blogged about it.
Dec 6nd, 2008 I posted a new bug about components not getting optimized for Windows. This is the bug.
Dec 6nd, 2008 After talking with Ted Mielczarek on IRC I have found out why the files I'm profiling are not getting merged into the optimized build. Here is the conversation.
Dec 6nd, 2008 My patch has made into mozilla-central. Here is the blog posting.
Dec 5nd, 2008 My patch has been reviewed. It needed some changes but was approved. This is the bug.
Dec 5nd, 2008 Still trying to get the address book optimized. Discovered that all the modules are getting optimized for size by default. I blogged about it.
Dec 3nd, 2008 Added speed optimizations to the address book module in Thunderbird. This library gets linked into the mail.dll.
Dec 2nd, 2008 I got a patch up that will disable pgo for the mozlcms module when it is not linked into the xul.dll.

November 2008


Date Comments
Nov 24th, 2008 I've been looking at the Thunderbird Makefiles. I'm trying to understand how the build process works. I blogged about it.
Nov 18th, 2008 I created a new bug to get input on how to enable PGO for Thunderbird without modifying the Mozilla core files. Blog is here.
Nov 12th, 2008 I have updated my 0.2 Release.
Nov 12th, 2008 Nomis who is working on enabling PGO for TB on Mac is having different errors than me. He is posting to the same bug as I am.
Nov 12th, 2008 A closed bug for PGO on Thunderbird has been re-opened. I am posting to it with new information and findings.
Nov 7th, 2008 I posted results from using PGO.
Nov 7th, 2008 I successfully compiled Thunderbird with PGO enabled. I had to disable PGO for the mozlcms.dll.
Nov 4th, 2008 Made change to the client.mk file for Thunderbird and compiled it with PGO enable. I received a compile error.
Nov 1st, 2008 Installed Windows 2003 for creating a testing environment.

October 2008


Date Comments
Oct 28th, 2008 Focusing on adding PGO to Thunderbird. Built Thunderbird from source.
Oct 17th, 2008 I have written up my 0.1 Release and have blogged about it.
Oct 16th, 2008 After compiling Firefox with sqlite pgo enabled I was able to reproduce the crash as reported on the bug. I also received errors in xpcshell which I posted to the bug on bugzilla. I also created a test application for sqlite and found it crashed when compiled with PGO as a stand alone application.
Oct 14th, 2008 Through the contribution of a fellow student I was able to create a script to automate multiple PGO Builds.
Oct 11th, 2008 I checked my performance tests again this time including a pgo build with no profiling and Google Maps was 45% on both Minefields. Regardless of the profiling.
Oct 10th, 2008 Updated the contributions section for help with creating bash shell scripts.
Oct 10th, 2008 Made a pgo performance chart. Google Maps was 45% faster in my pgo build after I profiled the site.
Oct 8th, 2008 Still receiving 35 failed tests even when I have no windows open and am not at the computer.
Oct 8th, 2008 Ted mentioned on IRC that the 35 failed tests may of happened because I was moving my mouse during the tests. Which I was. I'm going to try the tests again.
Oct 7th, 2008 Using pgomgr I am able to see what profiling data has been collected.
Oct 4th, 2008 A build of Firefox without PGO resulted in 35 failed Tests in Mochitest. Xpcshell passed just fine. At this time the tree is closed so I cannot get the latest bug free version.
Oct 2nd, 2008 After talking with Ted and Dave Humphrey I am going to focus my project on increasing the profiling of Firefox to increase its speed.

I am also enabling the modules that have PGO disable and running the xpcshell and Mochitests on them to determine if they are still broken or if they are now working.

September 2008


Date Comments
Sept 30th, 2008 Failed to reproduce bugs. I followed Ted's suggestions on my blog but still not experiencing any problems with my pgo build.
Sept 28th, 2008 Ted pointed me in the right direction on how to reproduce the PGO bugs. His post is here.
Sept 26th, 2008 Successfully compiled Firefox with PGO using Visual Studio 2005 compiler. Tests and debug are disabled.
Sept 26th, 2008 On IRC some guys suggested compiling with Visual Studio 2005 instead.
Sept 24th, 2008 Attempted to compile with debug and test disabled. Still Failed.
Sept 22th, 2008 Failed to compile Firefox with PGO on Visual Studio 2008.
Sept 20th, 2008 Successfully compiled one old assignment using PGO in Visual Studio. Results in Project Details.
Sept 19th, 2008 Tried to compile some old assignments using PGO in Visual Studio. Two assignments failed.
Sept 18th, 2008 Created this Project Page.
Sept 17th, 2008 Created First Build of Firefox.
Sept 15th, 2008 Met with Ted Mielczarek and discuss PGO Project.