Skip to content

Instantly share code, notes, and snippets.

View tchaikov's full-sized avatar
🏠
no good deed goes unpunished

Kefu Chai tchaikov

🏠
no good deed goes unpunished
View GitHub Profile
--- a/runtime/Cpp/include/antlr3cyclicdfa.hpp.orig 2024-02-01 14:13:33.243312124 +0200
+++ b/runtime/Cpp/include/antlr3cyclicdfa.hpp 2024-02-01 14:12:28.493542243 +0200
@@ -61,18 +61,18 @@
/// Decision number that a particular static structure
/// represents.
///
+ ANTLR_INT32 m_decisionNumber;
- const ANTLR_INT32 m_decisionNumber;
/// What this decision represents
From 478902a7e57e2283c57410f5aa14939e743b5102 Mon Sep 17 00:00:00 2001
From: Avi Kivity <avi@scylladb.com>
Date: Tue, 12 May 2020 14:51:18 +0300
Subject: [PATCH] antlr3memory.hpp: fix for C++20 mode
gcc 10 in C++20 mode requires that the allocator type match
the type used to allocate, so do that by adding "const" to the
key type.
---
runtime/Cpp/include/antlr3memory.hpp | 4 ++--
@tchaikov
tchaikov / build-llvm.sh
Last active January 26, 2024 05:43
llvm build
cmake -GNinja -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_INSTALL_PREFIX=$HOME/.local -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD='X86;WebAssembly' -DLLVM_ENABLE_PROJECTS='clang;lldb;lld;clang-tools-extra' -DLLVM_ENABLE_RUNTIMES='compiler-rt' -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_USE_LINKER=mold -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF -Bbuild llvm
@tchaikov
tchaikov / timed_wait.log
Created September 9, 2022 17:10
errno 98
This file has been truncated, but you can view the full file.
```
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 172.21.2.2:39848 172.21.2.2:6810 TIME_WAIT -
tcp 0 0 172.21.2.2:59212 172.21.2.2:6810 TIME_WAIT -
tcp 0 0 172.21.2.2:44284 172.21.2.2:6810 TIME_WAIT -
tcp 0 0 172.21.2.2:43420 172.21.2.2:6810 TIME_WAIT -
tcp 0 0 172.21.2.2:56747 172.21.2.2:6810 TIME_WAIT -
tcp 0 0 172.21.2.2:44234 172.21.2.2:6810 TIME_WAIT -
tcp 0 0 172.21.2.2:44193 172.21.2.2:6810 TIME_WAIT -
@tchaikov
tchaikov / container_of.hh
Created June 15, 2022 14:27
container_of in c++
template<class Container, class Member>
requires std::is_standard_layout_v<Container>
constexpr std::ptrdiff_t offset_of(const Member Container::* ptr_to_member) {
const Container* const container = 0;
const char* const member = static_cast<const char*>(static_cast<const void*>(&(container->*ptr_to_member)));
return std::ptrdiff_t(member - static_cast<const char*>(static_cast<const void*>(container)));
}
template<class Container, class Member >
constexpr Container* container_of(Member* ptr, const Member Container::* ptr_to_member) {
#!/usr/bin/env python3
import asyncio
import asyncio.subprocess
from io import StringIO
import logging
from typing import Tuple
try:

all 20 tests passed

run metric baseline result accepted
prefill/gen8/0 bandwidth 0.316429 0.316429 👍
prefill/gen8/0 cpu_cycles_per_op 110504230.31349206 110504230.31349206 👍
prefill/gen8/0 iops_avg 81.0 81.0 👍
prefill/gen8/0 iops_stddev 23.9653 23.9653 👍
prefill/gen8/0 latency_avg 0.193436 0.193436 👍
prefill/gen8/1 bandwidth 0.314911 0.314911 👍
prefill/gen8/1 cpu_cycles_per_op 110944486.21115538 110944486.21115538 👍

https://pulpito.ceph.com/kchai-2020-07-04_02:38:47-crimson-rados-wip-crimson-osd-flush-pg-stats-distro-basic-smithi/5197608/

2020-07-04T02:50:03.730 INFO:teuthology.orchestra.run.smithi145:> sudo MALLOC_CHECK_=3 adjust-ulimits ceph-coverage /home/ubuntu/cephtest/archive/coverage ceph-osd --no-mon-config --cluster ceph --mkfs --mkkey -i 0 --monmap /home/ubuntu/cephtest/ceph.monmap
2020-07-04T02:50:03.889 INFO:teuthology.orchestra.run.smithi145.stderr:*** longjmp causes uninitialized stack frame ***: ceph-osd terminated
2020-07-04T02:50:03.889 INFO:teuthology.orchestra.run.smithi145.stderr:Aborting on shard 0.
2020-07-04T02:50:03.889 INFO:teuthology.orchestra.run.smithi145.stderr:Backtrace:
2020-07-04T02:50:03.889 INFO:teuthology.orchestra.run.smithi145.stderr:  0x0000000000e50b4c
2020-07-04T02:50:03.890 INFO:teuthology.orchestra.run.smithi145.stderr:  0x0000000000e16580
2020-07-04T02:50:03.890 INFO:teuthology.orchestra.run.smithi145.stderr:  0x0000000000e16648
2020-07-04T02:50:03.890 INFO:teuthology.orches

focal

Current: =ep
Bounding set =cap_chown,cap_dac_override,cap_dac_read_search,cap_fowner,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_linux_immutable,cap_net_bind_service,cap_net_broadcast,cap_net_admin,cap_net_raw,cap_ipc_lock,cap_ipc_owner,cap_sys_module,cap_sys_rawio,cap_sys_chroot,cap_sys_ptrace,cap_sys_pacct,cap_sys_admin,cap_sys_boot,cap_sys_nice,cap_sys_resource,cap_sys_time,cap_sys_tty_config,cap_mknod,cap_lease,cap_audit_write,cap_audit_control,cap_setfcap,cap_mac_override,cap_mac_admin,cap_syslog,cap_wake_alarm,cap_block_suspend,cap_audit_read
Ambient set =
Current IAB:
Securebits: 00/0x0/1'b0
  1. create a GitHub app (foo), and note down the application id (app_id)
  2. install foo to repo (username/reponame) to be checked, and note down the install id (install_id)
  3. create a private key (pkey.PEM) at https://github.com/settings/apps/foo. please follow https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app
  4. create a personal access token (token) at https://github.com/settings/tokens
  5. get the git sha1 (sha1) to be checked
  6. install github3.py
  7. add a check run, see also https://developer.github.com/v3/checks/runs/
from github3 import login