Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Commit

Permalink
Add no-jit option, and stat-cache option.
Browse files Browse the repository at this point in the history
  • Loading branch information
mofarrell committed Mar 10, 2017
1 parent 29961c6 commit 4501db0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
10 changes: 8 additions & 2 deletions base/HHVMDaemon.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,21 @@ protected function getArguments(): Vector<string> {
'Server.ErrorDocument404=index.php',
'-v',
'Server.SourceRoot='.$this->target->getSourceRoot(),
'-v',
'Eval.Jit=1',
'-d',
'hhvm.log.file='.$this->options->tempDir.'/hhvm_error.log',
'-d',
'pid='.escapeshellarg($this->getPidFilePath()),
'-c',
OSS_PERFORMANCE_ROOT.'/conf/php.ini',
};
if ($this->options->jit) {
$args->addAll(Vector {'-v', 'Eval.Jit=1'});
} else {
$args->addAll(Vector {'-v', 'Eval.Jit=0'});
}
if ($this->options->statCache) {
$args->addAll(Vector {'-v', 'Server.StatCache=1'});
}
if ($this->options->pcreCache) {
$args->addAll(
Vector {'-v', 'Eval.PCRECacheType='.$this->options->pcreCache},
Expand Down
7 changes: 7 additions & 0 deletions base/PerfOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ final class PerfOptions {
public bool $allVolatile = false;
public bool $interpPseudomains = false;
public bool $proxygen = false;
public bool $jit = false;
public bool $statCache = false;

//
// HHVM specific options for generating performance data and profiling
Expand Down Expand Up @@ -135,7 +137,9 @@ public function __construct(Vector<string> $argv) {
'wait-after-warmup',
'no-proxygen',
'no-repo-auth',
'no-jit',
'no-file-cache',
'stat-cache',
'pcre-cache:',
'pcre-cache-expire:',
'pcre-cache-size:',
Expand Down Expand Up @@ -258,6 +262,8 @@ public function __construct(Vector<string> $argv) {
$this->noTimeLimit = $this->getBool('no-time-limit');
$this->waitAtEnd = $this->getBool('wait-at-end');
$this->proxygen = !$this->getBool('no-proxygen');
$this->statCache = $this->getBool('stat-cache');
$this->jit = !$this->getBool('no-jit');
$this->applyPatches = $this->getBool('apply-patches');

$fraction = $this->getFloat('cpu-fraction', 1.0);
Expand Down Expand Up @@ -332,6 +338,7 @@ public function validate() {
if ($this->php5) {
$this->precompile = false;
$this->proxygen = false;
$this->jit = false;
$this->filecache = false;
}
if ($this->hhvm) {
Expand Down

0 comments on commit 4501db0

Please sign in to comment.