new Promise
console.log
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
| # Uncomment deb-src lines on /etc/apt/sources.list | |
| sudo apt-get update | |
| # Or replace ~/glibc with preferred path to store libc source | |
| mkdir -p ~/glibc | |
| cd ~/glibc | |
| sudo apt-get install -y dpkg-dev | |
| sudo apt-get build-deps libc6 | |
| apt-get source libc6 |
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
| // Node v10.15.3 | |
| uprobe:/home/mmarchini/.nvm/versions/node/v10.15.3/bin/node:_ZN2v88internal17Builtin_JsonParseEiPPNS0_6ObjectEPNS0_7IsolateE | |
| { | |
| // Load constants | |
| $kPointerSize = (uint32)(1 << (*uaddr("v8dbg_PointerSizeLog2"))); | |
| $stringLengthOffset = (uint32)*uaddr("v8dbg_class_String__length__SMI"); | |
| $kTag = (uint32)*uaddr("v8dbg_HeapObjectTag"); | |
| $kTagMask = (uint32)*uaddr("v8dbg_SmiTagMask"); | |
| $kShiftSize = (uint32)*uaddr("v8dbg_SmiShiftSize"); |
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
| $ make LDFLAGS=-static NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 NO_JVMTI=1 | |
| BUILD: Doing 'make -j8' parallel build | |
| HOSTCC fixdep.o | |
| HOSTLD fixdep-in.o | |
| LINK fixdep | |
| Auto-detecting system features: | |
| ... dwarf: [ on ] | |
| ... dwarf_getlocations: [ on ] | |
| ... glibc: [ on ] |
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
| (lldb) target create "/home/mmarchini/.nvm/versions/node/v12.3.0/bin/node" --core "core.frame-scenario.1" | |
| Core file '/home/mmarchini/workspace/nodejs/llnode/core.frame-scenario.1' (x86_64) was loaded. | |
| (lldb) plugin load '/home/mmarchini/workspace/nodejs/llnode/llnode.so' | |
| (lldb) settings set prompt '(llnode) ' | |
| (llnode) command script import diagnose_unwind | |
| bind: Invalid command `enable-meta-key'. | |
| The "diagnose-unwind" command has been installed, type "help diagnose-unwind" for detailed help. | |
| (llnode) diagnose-unwind | |
| LLDB version lldb version 6.0.1 | |
| Unwind diagnostics for thread 1 |
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
| #include <v8.h> | |
| #include <v8-postmortem.h> | |
| #include <napi.h> | |
| #include <lldb/API/SBDebugger.h> | |
| #include <lldb/API/SBTarget.h> | |
| #include <lldb/API/SBProcess.h> | |
| #include <iostream> | |
| using lldb::addr_t; |
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
| 'use strict'; | |
| const http = require('http'); | |
| const port = 3000; | |
| class Visit { | |
| constructor(visit_id, headers) { | |
| this.visit_id = visit_id; | |
| this.headers = headers; | |
| } |
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 zsh | |
| local LAMBDA="%(?,%{$fg_bold[green]%}λ,%{$fg_bold[red]%}λ)" | |
| function get_pwd(){ | |
| git_root=$PWD | |
| while [[ $git_root != / && ! -e $git_root/.git ]]; do | |
| git_root=$git_root:h | |
| done | |
| if [[ $git_root = / ]]; then |
$ node benchmark/compare.js --old ./node-master --new ./node-hack-the-stack http > compare-hack-the-stack.http.csv
$ cat compare-hack-the-stack.http.csv | Rscript benchmark/compare.R
confidence improvement accuracy (*) (**) (***)
http/bench-parser.js n=100000 len=16 -1.17 % ±3.73% ±4.96% ±6.46%
http/bench-parser.js n=100000 len=32 -1.55 % ±3.19% ±4.24% ±5.52%
http/bench-parser.js n=100000 len=4 -2.90 % ±4.20% ±5.59% ±7.27%
http/bench-parser.js n=100000 len=8 -2.39 % ±3.41% ±4.54% ±5.91%
http/check_invalid_header_char.js n=1000000 input=''