Allow JSC heuristics to be set on the command-line
Created attachment 116230 [details]
Created attachment 116231 [details]
Created attachment 116616 [details]
Previous patch defined BadValue as one of the enumerated values, but that is #defined by xlib. Change to InvalidValue. Terrible.
Created attachment 116988 [details]
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.
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.
Actually, better still, I'll cc bdash!
Mark, is there a #define that will distinguish development release build from production builds?
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.
(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:
and the V8 flags:
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.
Created attachment 119206 [details]
Comment on attachment 119206 [details]
Clearing review flag on patches from before 2014. If this patch is still relevant, please reset the r? flag.