jprof support for tinderbox b=347966 r=coop

git-svn-id: svn://10.0.0.236/trunk@234081 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rhelmer%mozilla.com 2007-09-06 21:27:17 +00:00
parent 58ae72c1f6
commit cad135bd89
3 changed files with 15 additions and 5 deletions

View File

@ -24,7 +24,7 @@ use Config; # for $Config{sig_name} and $Config{sig_num}
use File::Find ();
use File::Copy;
$::UtilsVersion = '$Revision: 1.370 $ ';
$::UtilsVersion = '$Revision: 1.371 $ ';
package TinderUtils;
@ -2491,7 +2491,7 @@ sub run_all_tests {
# Settle OS.
run_system_cmd("sync; sleep 5", 35);
my @urlargs = (-chrome,"file:$build_dir/mozilla/xpfe/test/winopen.xul");
my @urlargs = (-chrome,"javascript:try{JProfStartProfiling();}catch(e){};window.location='file:$build_dir/mozilla/xpfe/test/winopen.xul'");
if($test_result eq 'success') {
if ($talkback_installed) {
setTestnameForTalkbackReport($talkback_ini_path,$test_name);
@ -2684,6 +2684,11 @@ sub AliveTestReturnToken {
}
}
if ($Settings::TestWithJprof) {
print_log "Running jprof for $test_name..\n";
run_shell_command("cd $binary_dir && ./jprof firefox-bin jprof-log > ../$test_name-jprof.html");
}
return $rv;
}
@ -2757,7 +2762,7 @@ sub LayoutPerformanceTest {
my $layout_time;
my $layout_time_details;
my $binary_log = "$build_dir/$test_name.log";
my $url = "http://$Settings::pageload_server/page-loader/loader.pl?delay=1000&nocache=0&maxcyc=4&timeout=$Settings::LayoutPerformanceTestPageTimeout&auto=1";
my $url = "javascript:try{JProfStartProfiling();}catch(e){};window.location='http://$Settings::pageload_server/page-loader/loader.pl?delay=1000&nocache=0&maxcyc=4&timeout=$Settings::LayoutPerformanceTestPageTimeout&auto=1'";
# Settle OS.
run_system_cmd("sync; sleep 5", 35);
@ -2833,7 +2838,7 @@ sub LayoutPerformanceLocalTest {
my $layout_time;
my $layout_time_details;
my $binary_log = "$build_dir/$test_name.log";
my $url = "http://localhost/pageload/cycler.html";
my $url = "javascript:try{JProfStartProfiling();}catch(e){};window.location='http://localhost/pageload/cycler.html'";
# Settle OS.
run_system_cmd("sync; sleep 5", 35);
@ -2889,7 +2894,7 @@ sub DHTMLPerformanceTest {
my $dhtml_time;
my $dhtml_time_details;
my $binary_log = "$build_dir/$test_name.log";
my $url = "http://www.mozilla.org/performance/test-cases/dhtml/runTests.html";
my $url = "javascript:try{JProfStartProfiling();}catch(e){};window.location='http://www.mozilla.org/performance/test-cases/dhtml/runTests.html'";
# Settle OS.
run_system_cmd("sync; sleep 5", 35);

View File

@ -323,6 +323,10 @@ sub packit {
$push_raw_xpis = $Settings::push_raw_xpis;
}
if ($Settings::TestWithJprof) {
TinderUtils::run_shell_command("cp $package_location/../*-jprof.html $stagedir/");
}
if (TinderUtils::is_windows() || TinderUtils::is_os2()) {
if ($Settings::stub_installer) {
TinderUtils::run_shell_command("cp $package_location/stub/*.exe $stagedir/");

View File

@ -82,6 +82,7 @@ $RunUnitTests = 0; # TUnit
# ("network","dom","toolkit","security/manager");
$CompareLocalesAviary = 0; # Should the compare-locales commands use the
# aviary directory structure?
$TestWithJprof = 0; # Use jprof profiler during tests
$TestsPhoneHome = 0; # Should test report back to server?
$GraphNameOverride = ''; # Override name built from ::hostname() and $BuildTag