This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define METHOD 1 | |
// I admit this is not an easy function to understand, but you will love it | |
// in a few seconds. | |
void reverseForEach(...) { } | |
#if METHOD == 1 | |
// This method use a separate data structure as an accumulator, and call a | |
// method to mutate the content of the accumulator. If you don't see any |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bpftrace | |
// | |
// idle-monitor Records amount of time the CPU is idle in-between 2 events. | |
// | |
// USAGE: idle-monitor.bt | |
// | |
// Monitor when CPUs are entering the idle state, and record the associated timestamp. | |
kprobe:rcu_idle_enter { | |
@cpuIdleCount[cpu] = nsecs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@idle_bw_fetch_end_and_exec_start: | |
(..., 0) 51 |@@ | | |
[0] 145 |@@@@@@@@ | | |
[1] 0 | | | |
[2, 4) 0 | | | |
[4, 8) 0 | | | |
[8, 16) 0 | | | |
[16, 32) 0 | | | |
[32, 64) 0 | | | |
[64, 128) 0 | | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ab = 1; | |
ab = 2; | |
ab = 3; | |
console.log(`ab = ${ab}, ab = ${ab}, ab = ${ab}`); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Script : | |
StatementList? | |
Module : | |
StatementList? | |
StatementList : | |
Statement | |
StatementList Statement |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This file should be copied to the top-level directory of real-js-samples to | |
// compare the legacy parser with the rust parser. | |
var dir = "20190416"; | |
var mode = "script"; | |
var runs_per_script = 1; | |
var filter_out = [ | |
"sw.js", | |
"1202200111%3Fmkt%3Den-GB%26it%3DZ%2CL%2CLA%26og%3D409%26cb%3DMicrosoft.Maps.NetworkCallbacks.normal%26jsonso%3D3c45c%26js%3D1%26tj%3D1%26lc%3D%26c4w%3D1%26vpt%3De%2Cp%2Cpg%26osm%3D1", | |
"PushService.js%3F1904121404450000", |