Bug 72960 - Allow JSC heuristics to be set on the command-line
Summary: Allow JSC heuristics to be set on the command-line
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 74498
Blocks: 72962 74510
  Show dependency treegraph
 
Reported: 2011-11-22 08:16 PST by Andy Wingo
Modified: 2014-02-05 10:51 PST (History)
3 users (show)

See Also:


Attachments
Patch (14.73 KB, patch)
2011-11-22 08:23 PST, Andy Wingo
no flags Details | Formatted Diff | Diff
Patch (14.39 KB, patch)
2011-11-22 08:24 PST, Andy Wingo
no flags Details | Formatted Diff | Diff
Patch (14.41 KB, patch)
2011-11-25 07:24 PST, Andy Wingo
no flags Details | Formatted Diff | Diff
Patch (16.22 KB, patch)
2011-11-29 09:51 PST, Andy Wingo
no flags Details | Formatted Diff | Diff
Patch (17.93 KB, patch)
2011-12-14 05:13 PST, Andy Wingo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Wingo 2011-11-22 08:16:47 PST
Allow JSC heuristics to be set on the command-line
Comment 1 Andy Wingo 2011-11-22 08:23:26 PST
Created attachment 116230 [details]
Patch
Comment 2 Andy Wingo 2011-11-22 08:24:55 PST
Created attachment 116231 [details]
Patch
Comment 3 Andy Wingo 2011-11-25 07:24:10 PST
Created attachment 116616 [details]
Patch
Comment 4 Andy Wingo 2011-11-25 07:25:31 PST
Previous patch defined BadValue as one of the enumerated values, but that is #defined by xlib.   Change to InvalidValue.  Terrible.
Comment 5 Andy Wingo 2011-11-29 09:51:26 PST
Created attachment 116988 [details]
Patch
Comment 6 Andy Wingo 2011-11-29 09:57:26 PST
New patch folds in support for boolean flags without values, e.g. --dump-bytecode / --no-dump-bytecode, and refactors support for parsing values from environment.
Comment 7 Gavin Barraclough 2011-11-29 12:00:25 PST
This seems useful for development purposes, but we ship a copy of jsc with the system, and I doubt we want to add this interface in customer releases.  Clearly we don't want to restrict this to debug builds, since a key use of these switches may be performance testing, but I think there may be a define that will distinguish between release & production builds.  Let me look into this.
Comment 8 Gavin Barraclough 2011-11-29 12:05:27 PST
Actually, better still, I'll cc bdash!

Mark, is there a #define that will distinguish development release build from production builds?
Comment 9 Mark Rowe (bdash) 2011-11-29 12:55:01 PST
There’s not.

I’m a little skeptical of the value of this patch though. These heuristics are infrequently changed. In the rare even that someone wants to experiment with tuning them it’s straightforward to tweak the constants in the source.
Comment 10 Andy Wingo 2011-11-30 02:08:10 PST
(In reply to comment #9)
> I’m a little skeptical of the value of this patch though. These heuristics are infrequently changed. In the rare even that someone wants to experiment with tuning them it’s straightforward to tweak the constants in the source.

This is a good argument with the current set of heuristics.  But with future boolean flags, I think that command-line integration is a lot more convincing.  Two examples: the JVM flags:

  http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html

and the V8 flags:

  http://paste.lisp.org/display/126181

If your main concern is the specific interface offered by jsc, another option would be to create another binary.  WDYT?  I think it's useful to have these options in JSC proper, but there is definitely room to disagree.
Comment 11 Andy Wingo 2011-12-14 05:13:18 PST
Created attachment 119206 [details]
Patch
Comment 12 Anders Carlsson 2014-02-05 10:51:25 PST
Comment on attachment 119206 [details]
Patch

Clearing review flag on patches from before 2014. If this patch is still relevant, please reset the r? flag.