Skip to content

Instantly share code, notes, and snippets.

View vext01's full-sized avatar
🏠
Working from home

Edd Barrett vext01

🏠
Working from home
View GitHub Profile
@vext01
vext01 / profiling.txt
Created January 12, 2021 11:29
Profiling
Costs > 1%.
Before:
```
Overhead Command Shared Object Symbol
9.51% mt::tests::simp ykrt-589c0db448b16d4d [.] core::sync::atomic::atomic_compare_exchange
8.78% mt::tests::simp ykrt-589c0db448b16d4d [.] core::intrinsics::is_aligned_and_not_null
7.89% mt::tests::simp ykrt-589c0db448b16d4d [.] core::option::Option<T>::as_ref
3.52% mt::tests::simp ykrt-589c0db448b16d4d [.] core::intrinsics::is_aligned_and_not_null
3.44% mt::tests::simp ykrt-589c0db448b16d4d [.] core::num::<impl usize>::checked_mul
let a = ...
let b = ...
if ... {
let z = a
} else {
let z = b
}
@vext01
vext01 / 1-without-valgrind.txt
Created December 9, 2020 14:07
Valgrind on yorick test.
$ /home/vext01/research/yorick/yk/target/debug/deps/ykrt-f04ce32da1a52e50 dumb_interp
running 1 test
test mt::tests::dumb_interpreter ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 5 filtered out; finished in 0.96s
@vext01
vext01 / __bindgen.i
Created August 24, 2020 14:27
bindgen issue
# 1 "__bindgen.c"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 349 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "__bindgen.c" 2
# 1 "./wrapper.h" 1
# 1 "/usr/include/link.h" 1 3 4
@vext01
vext01 / hack
Created August 19, 2020 16:20
syncthing hacking
arrakis:/tmp> cd syncthing
arrakis:syncthing> go mod edit -replace github.com/lucas-clemente/quic-go@v0.14.4=github.com/marten-seemann/qtls-go115@latest
arrakis:syncthing> go mod vendor
go: github.com/marten-seemann/qtls-go115@v0.10.0: parsing go.mod:
module declares its path as: github.com/marten-seemann/qtls
but was required as: github.com/lucas-clemente/quic-go
@vext01
vext01 / cscope.txt
Created August 10, 2020 19:45
nvim test failures
cd /usr/local/pobj/neovim-0.4.4/neovim-0.4.4/src/nvim/testdir && /usr/bin/env -i LC_CTYPE=en_US.UTF-8 gmake NVIM_PRG=/usr/local/pobj/neovim-0.4.4/build-amd64/bin/nvim USE_BUNDLED=OFF INTLTOOL_EXTRACT=/usr/local/bin/intltool-extract INTLTOOL_MERGE=/usr/local/bin/intltool-merge INTLTOOL_UPDATE=/usr/local/bin/intltool-update LIBTOOL="/usr/bin/libtool" SHARED_LIBS_LOG=/usr/local/pobj/neovim-0.4.4/build-amd64/shared_libs.log
[OLDTEST-PREP] Removing test.log and messages
[OLDTEST-PREP] Setting up .gdbinit
[OLDTEST-PREP] Running test1
[OLDESTTEST] Running test42
[OLDESTTEST] Running test48
[OLDESTTEST] Running test64
[OLDTEST] Running test_arabic
[OLDTEST] Running test_arglist
[OLDTEST] Running test_assert
@vext01
vext01 / main.rs
Last active August 5, 2020 11:36
dynasm fun
use dynasmrt::{dynasm, DynasmApi, x64::Rq::RAX, Register};
macro_rules! reg_to_mem {
($ops: expr, $reg: expr, $mem: expr) => {
dbg!($ops);
dynasm!($ops
; mov QWORD $mem, $reg
);
}
}
@vext01
vext01 / init.vim
Created August 4, 2020 13:50
language server nvim
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall | source $MYVIMRC
endif
syntax on
call plug#begin('~/.vim/plugged')
Plug 'autozimu/LanguageClient-neovim', {
@vext01
vext01 / LOG.txt
Created July 29, 2020 11:14
Rust tests wiithout optimisations. Linux/amd64 git 2c28244cf0fc9868f55070e55b8f332d196eaf3f
Check compiletest suite=ui mode=ui (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
running 10533 tests
.................................................................................................... 100/10533
.................................................................................................... 200/10533
...........................................................................F........................ 300/10533
.................................................................................................... 400/10533
.................................................................................................... 500/10533
...........................................................................................i........ 600/10533
.................................................................................................... 700/10533
@vext01
vext01 / backtrace
Created July 22, 2020 18:04
fs-uae hang v2
#0 _thread_sys___syscall () at -:3
#1 0x0000045e9f2c6579 in _libc_mmap (addr=0xb074b1000, len=4096, prot=-1624580310,
flags=4098, fd=-1, offset=7) at /usr/src/lib/libc/sys/mmap.c:47
#2 0x0000045c979ab2bc in try_alloc_32bit (size=4096, native_flags=4098,
native_protect=7,
p=0xb074b1000 <error: Cannot access memory at address 0xb074b1000>,
p_end=0x45f98846000 "") at src/vm.cpp:164
#3 0x0000045c979aa73c in uae_vm_alloc_with_flags (size=4096, flags=256, protect=7)
at src/vm.cpp:215
#4 0x0000045c979aa66c in uae_vm_alloc (size=4096, flags=256, protect=7)