Skip to content

Instantly share code, notes, and snippets.

View mgaudet's full-sized avatar

Matthew Gaudet mgaudet

View GitHub Profile
@mgaudet
mgaudet / displayDemo.asm
Created November 8, 2022 04:36
displaydemo.asm
#-------------------------------------------------------------------------------
# MultiTimer Common File
#
# Author: Zachary Selk
# Date: Jul 18, 2019
#-------------------------------------------------------------------------------
.data
.align 2
DISPLAY_CONTROL: .word 0xFFFF0008
DISPLAY_DATA: .word 0xFFFF000C
$ ../../../mach run run.js # Interpreter, CacheIR, Baseline, Ion: 34252 (3.5x)
$ ../../../mach run --no-ion run.js # Interpreter, CacheIR, Baseline: 9887 (2.0x)
$ ../../../mach run --no-ion --no-baseline --cache-ir-stubs=on run.js # Interpreter, CacheIR: 4890 (6.6x)
$ ../../../mach run --no-ion --no-baseline --cache-ir-stubs=off run.js # Interpreter: 739
MOZCONFIG:
ac_add_options --enable-application=js
ac_add_options --enable-optimize
@mgaudet
mgaudet / Example.md
Created May 22, 2020 21:12
Used Name tracker example

Example 2: Shadowing and closing over.

Remember: Pairs are (ScriptNum, ScopeNum)

// Script 1
// Scope 1
var x = 1;                              // Declared(1) = [x];
function f() // Script 2
{ // Scope 2
@mgaudet
mgaudet / FunctionAllocations.md
Created May 24, 2019 18:39
Where are Functions allocated before the function boxes

FunctionNode* Parser<FullParseHandler, Unit>::standaloneFunction

  • Has a Function argument, Called from
  • FunctionNode* frontend::StandaloneFunctionCompiler<Unit>::parse which has a function argument, called from
  • static bool CompileStandaloneFunction which has a function argument. Called from
    • bool frontend::CompileStandaloneGenerator
    • bool frontend::CompileStandaloneAsyncFunction
    • bool frontend::CompileStandaloneAsyncGenerator
      • All of the above CompileStandAlones, plus the below CompileStandAloneFunction are called from CreateDynamicFunction: the function is allocated there. The above three are -only- called from CreateDynamicFunction.
  • bool frontend::CompileStandaloneFunction which has a function argument. Called from
0x2b872bbb5456: testl %edx, %edx ; branchTest32 (the test)
0x2b872bbb5458: jne 0x2b872bbb546d ; branchTest32 (the jump to true)
0x2b872bbb545e: movabsq $0x37c1c9d258a0, %rax ; movPtr
0x2b872bbb5468: jmp 0x2b872bbb5477 ; jump done
true: 0x2b872bbb546d: movabsq $0x37c1c9d27480, %rax ; movPtr
done: 0x2b872bbb5477: <unrelated instruction>
@mgaudet
mgaudet / Verbose.log
Created December 15, 2017 15:07
Gathering a Testarossa Verbose Log
$ java -Xjit:traceIlGen,log=logFile,verbose -version
#INFO: _______________________________________
#INFO: Version Information:
#INFO: JIT Level - 292f272
#INFO: JVM Level - 20171027_36
#INFO: GC Level - 292f272
#INFO:
#INFO: Processor Information:
#INFO: Platform Info:X86 Intel P6
@mgaudet
mgaudet / Verbose.log
Created December 15, 2017 15:05
Gathering a Testarossa Verbose Log
$ java -Xjit:traceIlGen,log=logFile,verbose -version
#INFO: _______________________________________
#INFO: Version Information:
#INFO: JIT Level - 292f272
#INFO: JVM Level - 20171027_36
#INFO: GC Level - 292f272
#INFO:
#INFO: Processor Information:
#INFO: Platform Info:X86 Intel P6
@mgaudet
mgaudet / Trace.log
Created December 15, 2017 02:29
A Testarossa Trace Log for java/lang/String.hashCode()I
<?xml version="1.0" standalone="no"?>
<jitlog>
<!--
MULTIPLE LOG FILES MAY EXIST
Please check for ADDITIONAL log files named: logFile.1 logFile.2 logFile.3 logFile.4 logFile.5 logFile.6
-->
<compile
method="java/lang/String.hashCode()I"
hotness="warm"
isProfilingCompile=0>
@mgaudet
mgaudet / 0001-Revert.patch
Created December 5, 2016 14:41
Revert SIGABRT handler in Ruby+OMR Preview
From 595dfc0c2b55e5b5da418c4f80d4922817822b74 Mon Sep 17 00:00:00 2001
From: Matthew Gaudet <magaudet@ca.ibm.com>
Date: Mon, 5 Dec 2016 09:38:57 -0500
Subject: [PATCH] Revert "Register a handler for sigabrt."
---
signal.c | 23 -----------------------
1 file changed, 23 deletions(-)
diff --git a/signal.c b/signal.c