This file contains 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
$ lscpu -J | jq '.lscpu.[] | select(.field == "Model name:").data' -r | |
AMD Ryzen Threadripper PRO 5975WX 32-Cores | |
$ musl-clang -static -O3 -o test-syscalls test-syscalls.cpp | |
$ ldd test-syscalls | |
not a dynamic executable | |
$ ./test-syscalls | |
gettid: 48735.848us, 20518777.061 cps, 48.736 ns per call | |
clock_gettime (VDSO): 20660.516us, 48401501.686 cps, 20.661 ns per call | |
nothing_indirect_call: 0.020us, 50000000000000.000 cps, 0.000 ns per call | |
nothing: 0.020us, 50000000000000.000 cps, 0.000 ns per call |
This file contains 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
#!/bin/sh | |
# | |
# init.d script with LSB support. | |
# | |
# Copyright (c) 2007 Javier Fernandez-Sanguino <jfs@debian.org> | |
# | |
# This is free software; you may redistribute it and/or modify | |
# it under the terms of the GNU General Public License as | |
# published by the Free Software Foundation; either version 2, | |
# or (at your option) any later version. |
This file contains 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
" Do not run defaults vim, that can enable mouse mode and other stuff | |
" | |
" Defaults: | |
" - /usr/share/vim/vim80/defaults.vim (debian) | |
let g:skip_defaults_vim=1 | |
runtime! debian.vim | |
runtime! archlinux.vim | |
" Load vim-plug |
This file contains 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 python3 | |
import sys | |
import re | |
""" | |
Decode kernel message from mpt*sas, like: | |
mpt3sas_cm0: log_info(0x31120303): originator(PL), code(0x12), sub_code(0x0303) | |
mpt2sas_cm0: log_info(0x31120303): originator(PL), code(0x12), sub_code(0x0303) |
This file contains 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 bash | |
# This is wrapper for faster addr2line, that is required for "perf --call-graph dwarf" | |
# NOTE: since v6.3 perf supports specifying addr2line and supports LLVM so it is not required there | |
# stdbuf is important here to avoid buffering, otherwise perf will stuck | |
stdbuf -o0 -i0 sed -e 's/,//' -e 's/^$/ffffffffffffff/' | llvm-addr2line "$@" |
This file contains 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 <boost/smart_ptr/detail/spinlock.hpp> | |
#include <cstdint> | |
#include <cstring> | |
#include <cassert> | |
#include <iostream> | |
#include <list> | |
#include <mutex> | |
#include <optional> | |
#include <shared_mutex> | |
#include <thread> |
This file contains 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 <cstdint> | |
#include <ctime> | |
#include <cerrno> | |
#include <iostream> | |
#include <utility> | |
uint64_t now_ns(clockid_t clock) | |
{ | |
struct timespec ts; | |
clock_gettime(clock, &ts); |
This file contains 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 <cstdint> | |
#include <ctime> | |
#include <iostream> | |
#include <sys/types.h> | |
#include <thread> | |
#include <list> | |
uint64_t now_ns() | |
{ | |
struct timespec ts; |
This file contains 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 python | |
# Based on https://github.com/goldshtn/linux-tracing-workshop | |
# Based on https://gist.github.com/SaveTheRbtz/807be09f73d13b80e429d45bd1707e00 | |
""" | |
The MIT License (MIT) | |
Copyright (c) 2017 Sasha Goldshtein | |
Copyright (c) 2018 Alexey Ivanov |
This file contains 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 <bits/time.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <sys/types.h> | |
#include <time.h> | |
// Answers the question "Does cache oblivious in jemalloc still make sense?" | |
// The short answer is "Yes"! | |
// |
NewerOlder