com web/rmtools: Train with two scenarios now: data/config/branch/x64/php71.ini data/config/branch/x86/php71.ini include/BuildVC.php
| From: | Anatol Belski | Date: | Thu, 24 Aug 2017 10:57:49 +0000 |
| Subject: | com web/rmtools: Train with two scenarios now: data/config/branch/x64/php71.ini data/config/branch/x86/php71.ini include/BuildVC.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-26342@lists.php.net to get a copy of this message | ||
Commit: cdf0eb769342232549ead10fdde5212ea20d2aa5
Author: Anatol Belski <ab@php.net> Thu, 24 Aug 2017 12:57:49 +0200
Parents: 9af1b0b772682c852ee57b0937bb2f0731f2842e
Branches: master
Link: http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=cdf0eb769342232549ead10fdde5212ea20d2aa5
Log:
Train with two scenarios now
Changed paths:
M data/config/branch/x64/php71.ini
M data/config/branch/x86/php71.ini
M include/BuildVC.php
Diff:
diff --git a/data/config/branch/x64/php71.ini b/data/config/branch/x64/php71.ini
index c7dfdde..8181f74 100644
--- a/data/config/branch/x64/php71.ini
+++ b/data/config/branch/x64/php71.ini
@@ -7,7 +7,7 @@ build_dir=C:/php-snap-build/obj-x64
build_location=C:/php-snap-build/snap_7.1/vc14/x64/
appver=2008
debug=0
-pgo=0
+pgo=1
compiler=vc14
arch=x64
diff --git a/data/config/branch/x86/php71.ini b/data/config/branch/x86/php71.ini
index 8b86cf1..12793d5 100644
--- a/data/config/branch/x86/php71.ini
+++ b/data/config/branch/x86/php71.ini
@@ -7,7 +7,7 @@ build_dir=C:/php-snap-build/obj
build_location=C:/php-snap-build/snap_7.1/vc14/x86/
appver=2008
debug=0
-pgo=0
+pgo=1
compiler=vc14
arch=x86
diff --git a/include/BuildVC.php b/include/BuildVC.php
index 867925a..d409703 100644
--- a/include/BuildVC.php
+++ b/include/BuildVC.php
@@ -154,12 +154,17 @@ class BuildVC {
$env = $this->env;
$env["Path"] = dirname($this->build_dir) . DIRECTORY_SEPARATOR . "deps" .
DIRECTORY_SEPARATOR . "bin;" . $env["Path"];
- $cmd = 'phpsdk_pgo --train';
- $ret = exec_single_log($cmd, $this->build_dir, $env);
- if (!$ret || 0 != $ret["return_value"]) {
- throw new \Exception('phpsdk_pgo --train failed');
+ foreach (array("default", "cache") as $scenario) {
+ $cmd = 'phpsdk_pgo --train --scenario=' . $scenario;
+ $ret = exec_single_log($cmd, $this->build_dir, $env);
+ if (!$ret || 0 != $ret["return_value"]) {
+ if ($ret["log"]) {
+ $this->log_pgo .= $ret["log"];
+ }
+ throw new \Exception("'$cmd' failed");
+ }
+ $this->log_pgo .= $ret["log"];
}
- $this->log_pgo .= $ret["log"];
}
function configure($extra = false, $rm_obj = true)