⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 248326 in webkit


Ignore:
Timestamp:
Aug 6, 2019, 4:24:26 PM (7 years ago)
Author:
msaboff@apple.com
Message:

Make JSC memory benchmark available on OpenSource
https://bugs.webkit.org/show_bug.cgi?id=195012

Reviewed by Saam Barati.

This patch upstreams the RAMification memory benchmark to open source.

The prior RAMification.py driver script in the Internal directory has been moved here
with the device execution code seperated out to a new Internal driver script.
As a result, command line argument parsing as well as acting on the resulting argument
values has changed. The remote device Runner creates an ArgumentParser object that is
passed through main(). In main(), if we have an ArgumentParser, we use it otherwise we
create one for benchmarking locally. The arguments object returned from argument
parsing is now passed to the Runner constructor so it can extract the settings appropriate
for that particular runner.

Added some sane argument default values for the JSC command patch and the JetStream2
source directory.

Updated the Lua tests to eliminate the testing harness and its overhead, matching what was
done in the Internal tree.

  • JetStream2/LuaJSFight/hello_world.js:

(Benchmark.prototype.runIteration): Deleted.
(Benchmark): Deleted.

  • JetStream2/LuaJSFight/list_search.js:

(run): Deleted.
(Benchmark.prototype.runIteration): Deleted.
(Benchmark): Deleted.

  • JetStream2/LuaJSFight/lists.js:

(): Deleted.
(Benchmark.prototype.runIteration): Deleted.
(Benchmark): Deleted.

  • JetStream2/LuaJSFight/richards.js: Added.

(runRichards):
(Scheduler):
(Scheduler.prototype.addIdleTask):
(Scheduler.prototype.addWorkerTask):
(Scheduler.prototype.addHandlerTask):
(Scheduler.prototype.addDeviceTask):
(Scheduler.prototype.addRunningTask):
(Scheduler.prototype.addTask):
(Scheduler.prototype.schedule):
(Scheduler.prototype.release):
(Scheduler.prototype.holdCurrent):
(Scheduler.prototype.suspendCurrent):
(Scheduler.prototype.queue):
(TaskControlBlock):
(TaskControlBlock.prototype.setRunning):
(TaskControlBlock.prototype.markAsNotHeld):
(TaskControlBlock.prototype.markAsHeld):
(TaskControlBlock.prototype.isHeldOrSuspended):
(TaskControlBlock.prototype.markAsSuspended):
(TaskControlBlock.prototype.markAsRunnable):
(TaskControlBlock.prototype.run):
(TaskControlBlock.prototype.checkPriorityAdd):
(TaskControlBlock.prototype.toString):
(IdleTask):
(IdleTask.prototype.run):
(IdleTask.prototype.toString):
(DeviceTask):
(DeviceTask.prototype.run):
(DeviceTask.prototype.toString):
(WorkerTask):
(WorkerTask.prototype.run):
(WorkerTask.prototype.toString):
(HandlerTask):
(HandlerTask.prototype.run):
(HandlerTask.prototype.toString):
(Packet):
(Packet.prototype.addTo):
(Packet.prototype.toString):

  • JetStream2/LuaJSFight/string_lists.js:

(): Deleted.
(Benchmark.prototype.runIteration): Deleted.
(Benchmark): Deleted.

  • JetStream2/RAMification.py: Added.

(mean):
(geomean):
(frameworkPathFromExecutablePath):
(parseArgs):
(parseArgs.optStrToBool):
(BaseRunner):
(BaseRunner.init):
(BaseRunner.setup):
(BaseRunner.setEnv):
(BaseRunner.unsetEnv):
(BaseRunner.resetForTest):
(BaseRunner.processLine):
(BaseRunner.setReturnCode):
(BaseRunner.getResults):
(LocalRunner):
(LocalRunner.init):
(LocalRunner.runOneTest):
(main):
(main.runTestList):

  • JetStream2/init.py: Added.
Location:
trunk/PerformanceTests
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/PerformanceTests/ChangeLog

    r247761 r248326  
     12019-08-06  Michael Saboff  <msaboff@apple.com>
     2
     3        Make JSC memory benchmark available on OpenSource
     4        https://bugs.webkit.org/show_bug.cgi?id=195012
     5
     6        Reviewed by Saam Barati.
     7
     8        This patch upstreams the RAMification memory benchmark to open source.
     9
     10        The prior RAMification.py driver script in the Internal directory has been moved here
     11        with the device execution code seperated out to a new Internal driver script.
     12        As a result, command line argument parsing as well as acting on the resulting argument
     13        values has changed.  The remote device Runner creates an ArgumentParser object that is
     14        passed through main().  In main(), if we have an ArgumentParser, we use it otherwise we
     15        create one for benchmarking locally.  The arguments object returned from argument
     16        parsing is now passed to the Runner constructor so it can extract the settings appropriate
     17        for that particular runner.
     18
     19        Added some sane argument default values for the JSC command patch and the JetStream2
     20        source directory.
     21
     22        Updated the Lua tests to eliminate the testing harness and its overhead, matching what was
     23        done in the Internal tree.
     24
     25        * JetStream2/LuaJSFight/hello_world.js:
     26        (Benchmark.prototype.runIteration): Deleted.
     27        (Benchmark): Deleted.
     28        * JetStream2/LuaJSFight/list_search.js:
     29        (run): Deleted.
     30        (Benchmark.prototype.runIteration): Deleted.
     31        (Benchmark): Deleted.
     32        * JetStream2/LuaJSFight/lists.js:
     33        (): Deleted.
     34        (Benchmark.prototype.runIteration): Deleted.
     35        (Benchmark): Deleted.
     36        * JetStream2/LuaJSFight/richards.js: Added.
     37        (runRichards):
     38        (Scheduler):
     39        (Scheduler.prototype.addIdleTask):
     40        (Scheduler.prototype.addWorkerTask):
     41        (Scheduler.prototype.addHandlerTask):
     42        (Scheduler.prototype.addDeviceTask):
     43        (Scheduler.prototype.addRunningTask):
     44        (Scheduler.prototype.addTask):
     45        (Scheduler.prototype.schedule):
     46        (Scheduler.prototype.release):
     47        (Scheduler.prototype.holdCurrent):
     48        (Scheduler.prototype.suspendCurrent):
     49        (Scheduler.prototype.queue):
     50        (TaskControlBlock):
     51        (TaskControlBlock.prototype.setRunning):
     52        (TaskControlBlock.prototype.markAsNotHeld):
     53        (TaskControlBlock.prototype.markAsHeld):
     54        (TaskControlBlock.prototype.isHeldOrSuspended):
     55        (TaskControlBlock.prototype.markAsSuspended):
     56        (TaskControlBlock.prototype.markAsRunnable):
     57        (TaskControlBlock.prototype.run):
     58        (TaskControlBlock.prototype.checkPriorityAdd):
     59        (TaskControlBlock.prototype.toString):
     60        (IdleTask):
     61        (IdleTask.prototype.run):
     62        (IdleTask.prototype.toString):
     63        (DeviceTask):
     64        (DeviceTask.prototype.run):
     65        (DeviceTask.prototype.toString):
     66        (WorkerTask):
     67        (WorkerTask.prototype.run):
     68        (WorkerTask.prototype.toString):
     69        (HandlerTask):
     70        (HandlerTask.prototype.run):
     71        (HandlerTask.prototype.toString):
     72        (Packet):
     73        (Packet.prototype.addTo):
     74        (Packet.prototype.toString):
     75        * JetStream2/LuaJSFight/string_lists.js:
     76        (): Deleted.
     77        (Benchmark.prototype.runIteration): Deleted.
     78        (Benchmark): Deleted.
     79        * JetStream2/RAMification.py: Added.
     80        (mean):
     81        (geomean):
     82        (frameworkPathFromExecutablePath):
     83        (parseArgs):
     84        (parseArgs.optStrToBool):
     85        (BaseRunner):
     86        (BaseRunner.__init__):
     87        (BaseRunner.setup):
     88        (BaseRunner.setEnv):
     89        (BaseRunner.unsetEnv):
     90        (BaseRunner.resetForTest):
     91        (BaseRunner.processLine):
     92        (BaseRunner.setReturnCode):
     93        (BaseRunner.getResults):
     94        (LocalRunner):
     95        (LocalRunner.__init__):
     96        (LocalRunner.runOneTest):
     97        (main):
     98        (main.runTestList):
     99        * JetStream2/__init__.py: Added.
     100
    11012019-07-23  Keith Rollin  <krollin@apple.com>
    2102
  • trunk/PerformanceTests/JetStream2/LuaJSFight/hello_world.js

    r237263 r248326  
    1 class Benchmark {
    2     runIteration() {
    3         print("Hello world!");
    4     }
    5 }
     1print("Hello world!");
  • trunk/PerformanceTests/JetStream2/LuaJSFight/list_search.js

    r237263 r248326  
    99nums = [1, 2, 3, 4, 5, 6, 7];
    1010function isEven(x) { return (x & 1) == 0; }
    11 
    12 function run()
    13 {
    14     firstEven = firstWhere(nums, isEven);
    15     print('First even: ' + firstEven)
    16 }
    17 
    18 class Benchmark {
    19     runIteration() {
    20         run();
    21     }
    22 }
    23 
     11firstEven = firstWhere(nums, isEven);
     12print('First even: ' + firstEven)
  • trunk/PerformanceTests/JetStream2/LuaJSFight/lists.js

    r237263 r248326  
    33var items = [];
    44
    5 function run()
    6 {
    7     items = [];
    8     while (i < n) {
    9         items.push(i);
    10         i = i + 1;
    11     }
     5while (i < n) {
     6    items.push(i);
     7    i = i + 1;
    128}
    13 
    14 class Benchmark {
    15     runIteration() {
    16         run();
    17     }
    18 }
  • trunk/PerformanceTests/JetStream2/LuaJSFight/string_lists.js

    r237263 r248326  
    33var items = [];
    44
    5 function run()
    6 {
    7     items = [];
    8     while (i < n) {
    9         items.push("digit" + i);
    10         i = i + 1;
    11     }
     5while (i < n) {
     6    items.push("digit" + i);
     7    i = i + 1;
    128}
    13 
    14 class Benchmark {
    15     runIteration() {
    16         run();
    17     }
    18 }
Note: See TracChangeset for help on using the changeset viewer.