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
// https://github.com/packetzero/etwrealtime/blob/master/etwrealtime/packet_trace.cpp | |
// https://mollyrocket.com/casey/stream_0029.html | |
// https://docs.microsoft.com/en-us/dotnet/framework/performance/clr-etw-providers | |
#define WINNT | |
#include <windows.h> | |
#include <evntrace.h> | |
#include <evntprov.h> | |
#include <iostream> | |
#include <array> |
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
/* g++ -Wall -Wextra --std=c++14 -g abc.cpp -lbfd && valgrind ./a.out */ | |
#include <bfd.h> | |
#include <elf.h> | |
#include <cassert> | |
#include <cstring> | |
#include <iostream> | |
#include <fstream> | |
#include <vector> | |
#include <string> | |
#include <array> |
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
# allocator | |
### [ spans, bitmap, arena ] | |
schedinit | |
mallocinit | |
calculate arena, spans, bitmap size | |
arena = 512GB | |
spans = 512MB (arena / page * ptr, 512G / 8K * 8, map page => *span) | |
bitmap = 16GB (arena / (ptr * 8 / 2), 512G / 32, map 1 byte => 4 pointer | 2 bit => pointer) |
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
G - goroutine | |
M - worker thread, or machine (native thread) | |
P - processor, a resource that is required to execute Go code | |
M must have an associated P to execute Go code, | |
however it can be blocked or in a syscall without an associated P | |
Worker thread parking/unparking | |
A worker thread is considered spinning if | |
if it is out of local work and did not find work in global run queue/netpoller |
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
https://hub.docker.com/r/scylladb/scylla | |
docker pull scylladb/scylla | |
mkdir -p /var/lib/scylla-node-1/data /var/lib/scylla-node-1/commitlog | |
docker run --name scylla-node-1 --volume /var/lib/scylla-node-1:/var/lib/scylla -d scylladb/scylla | |
docker exec -it scylla-node-1 bash | |
docker logs scylla-node-1 | tail | |
mkdir -p /var/lib/scylla-node-2/data /var/lib/scylla-node-2/commitlog | |
docker run --name scylla-node-2 --volume /var/lib/scylla-node-2:/var/lib/scylla -d scylladb/scylla --seeds="$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' scylla-node-1)" |
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
sudo apt-get install vim python3-pip | |
sudo update-alternatives --config vi # choose vim.basic auto mode | |
# https://github.com/tpope/vim-pathogen | |
mkdir -p ~/.vim/autoload ~/.vim/bundle && \ | |
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim | |
# https://github.com/morhetz/gruvbox/wiki/Installation | |
git clone https://github.com/morhetz/gruvbox.git ~/.vim/bundle/gruvbox |
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
****** START compiling ConsoleApplication.Program:Main(ref) (MethodHash=1499abcb) | |
Generating code for Unix x64 | |
OPTIONS: compCodeOpt = BLENDED_CODE | |
OPTIONS: compDbgCode = true | |
OPTIONS: compDbgInfo = true | |
OPTIONS: compDbgEnC = false | |
OPTIONS: compProcedureSplitting = false | |
OPTIONS: compProcedureSplittingEH = false | |
OPTIONS: Stack probing is DISABLED | |
IL to import: |
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
链接 | |
https://github.com/dotnet/coreclr/blob/master/Documentation/botr/ryujit-tutorial.md | |
https://github.com/dotnet/coreclr/blob/release/1.1.0/Documentation/botr/ryujit-overview.md | |
https://github.com/dotnet/coreclr/blob/release/1.1.0/Documentation/botr/porting-ryujit.md | |
https://github.com/dotnet/coreclr/blob/release/1.1.0/Documentation/building/viewing-jit-dumps.md | |
https://github.com/dotnet/coreclr/blob/release/1.1.0/Documentation/project-docs/clr-configuration-knobs.md | |
https://github.com/dotnet/coreclr/blob/release/1.1.0/Documentation/building/debugging-instructions.md | |
https://github.com/dotnet/coreclr/blob/release/1.1.0/Documentation/botr/clr-abi.md | |
https://github.com/dotnet/coreclr/blob/release/1.1.0/Documentation/design-docs/finally-optimizations.md | |
https://github.com/dotnet/coreclr/blob/release/1.1.0/Documentation/design-docs/jit-call-morphing.md |
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
public static uint SizeOf(object obj) | |
{ | |
unsafe | |
{ | |
var objRef = __makeref(obj); | |
var objPtr = **(IntPtr**)(&objRef); | |
var mtPtr = *((IntPtr*)objPtr); | |
var componentSize = *((ushort*)(mtPtr + 0)); | |
var flags = *((ushort*)(mtPtr + 2)); |
NewerOlder