| Fix ineffective enable_if constraints in bvar and butil (#3547) * Fix ineffective enable_if constraints in bvar and butil * Add reset UT * Use std::enable_if_t instead of std::enable_if::type * Opt BabylonVariable::reset() comment | 1 month ago |
| Replace NULL with nullptr in butil/debug (#3438) | 3 months ago |
| Replace NULL with nullptr in butil/details, butil/mac, butil/synchronization and butil/time (#3439) | 3 months ago |
| Refactor NULL with nullptr in butil/files (#3440) | 3 months ago |
| Replace NULL with nullptr in butil/details, butil/mac, butil/synchronization and butil/time (#3439) | 3 months ago |
| Fix ineffective enable_if constraints in bvar and butil (#3547) * Fix ineffective enable_if constraints in bvar and butil * Add reset UT * Use std::enable_if_t instead of std::enable_if::type * Opt BabylonVariable::reset() comment | 1 month ago |
| butil: fix undefined behaviors (#3135) There are two kinds of problems: 1. signed number overflow is undefined behavior; 2. vsnprintfT may return E2BIG instead of EOVERFLOW. | 11 months ago |
| emplace/emplace_back replace push_back(std::make_pair(,))/insert(std::make_pair(,)) | 5 years ago |
| Refactor NULL with nullptr in butil/strings (#3442) | 3 months ago |
| Support seqlock and use it for TaskGroup CPU time stat (#3541) | 2 months ago |
| optimize base64 for riscv64 with RVV vrgather and vectorized decode (#3388) * optimize base64 for riscv64 with RVV vrgather and vectorized decode - Add RVV-accelerated base64 encode using vrgather vector indexed load for parallel table lookup (16 bytes per iteration, LMUL=4) - Add RVV-accelerated base64 decode using vectorized range comparisons and vmerge chain for classification (16 input bytes per iteration) - Integrate RVV dispatch into modp_b64.cc with compile-time selection when __riscv_vector is defined - Add modp_b64_rvv.cc to CMakeLists.txt build sources - Performance (SG2044 rv64gcv): decode 3-5x faster, up to 764 MB/s - Tested with RFC 4648 vectors and 100-round random data roundtrip Signed-off-by: Xiaofei Gong <gongxiaofei24@iscas.ac.cn> Signed-off-by: YuanSheng <yuansheng@isrc.iscas.ac.cn> * Fix 5 review issues in RVV base64 implementation - Replace placeholder license in modp_b64_rvv.h with Apache-2.0 header - Add NUL terminator in rvv_modp_b64_encode scalar tail - Strip trailing '=' padding at entry of rvv_modp_b64_decode - Handle leftover 2/3 chars in decode scalar fallback - Add modp_b64_rvv.cc to BUILD.bazel BUTIL_SRCS All 5 fixes verified on real rv64gcv hardware (8/8 gtest pass). Signed-off-by: Xiaofei Gong <gongxiaofei24@iscas.ac.cn> Signed-off-by: YuanSheng <yuansheng@isrc.iscas.ac.cn> --------- Signed-off-by: Xiaofei Gong <gongxiaofei24@iscas.ac.cn> Signed-off-by: YuanSheng <yuansheng@isrc.iscas.ac.cn> | 4 months ago |
| Refactor NULL with nullptr in butil/threading (#3443) | 3 months ago |
| Replace NULL with nullptr in butil/details, butil/mac, butil/synchronization and butil/time (#3439) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| Add RISC-V architecture support (#3125) This commit adds full support for RISC-V 64-bit architecture to brpc. Changes include: - Add RISC-V atomic operations implementation - Add RISC-V architecture detection in build system - Add RISC-V context switching (bthread support) - Add RISC-V clock cycle counter support (rdcycle) - Update CMake and Makefile for RISC-V compilation All core functionalities have been tested and verified in QEMU RISC-V environment, including: - Atomic operations (32-bit and 64-bit) - Memory barriers - Context switching - Clock cycle counting Co-authored-by: gong-flying <gongxiaofei24@iscas.ac.cn> | 11 months ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| Add support for loongarch64 (#2364) | 3 years ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| Add RISC-V architecture support (#3125) This commit adds full support for RISC-V 64-bit architecture to brpc. Changes include: - Add RISC-V atomic operations implementation - Add RISC-V architecture detection in build system - Add RISC-V context switching (bthread support) - Add RISC-V clock cycle counter support (rdcycle) - Update CMake and Makefile for RISC-V compilation All core functionalities have been tested and verified in QEMU RISC-V environment, including: - Atomic operations (32-bit and 64-bit) - Memory barriers - Context switching - Clock cycle counting Co-authored-by: gong-flying <gongxiaofei24@iscas.ac.cn> | 11 months ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| Rename base to butil to avoid potential naming conflicts | 9 years ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| Support url safe base64 (#2337) * Support url safe base64 * Update base64url license * Update base64url license | 3 years ago |
| Support url safe base64 (#2337) * Support url safe base64 * Update base64url license * Update base64url license | 3 years ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| Rename base to butil to avoid potential naming conflicts | 9 years ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| fix warnings on MACOS | 6 years ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| Add RISC-V architecture support (#3125) This commit adds full support for RISC-V 64-bit architecture to brpc. Changes include: - Add RISC-V atomic operations implementation - Add RISC-V architecture detection in build system - Add RISC-V context switching (bthread support) - Add RISC-V clock cycle counter support (rdcycle) - Update CMake and Makefile for RISC-V compilation All core functionalities have been tested and verified in QEMU RISC-V environment, including: - Atomic operations (32-bit and 64-bit) - Memory barriers - Context switching - Clock cycle counting Co-authored-by: gong-flying <gongxiaofei24@iscas.ac.cn> | 11 months ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Fix the linkage errors caused by duplicate symbols (#1936) | 4 years ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| remove authors | 6 years ago |
| Support AddressSanitizer (#2890) * Support AddressSanitizer * Add gperftools helper header | 1 year ago |
| Rename base to butil to avoid potential naming conflicts | 9 years ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| Rewrite RISC-V Zvbc CRC32C with adaptive VLEN and pure-vector folding (#3571) PR3332 introduced a Zvbc vector CRC32C path, but its implementation kept per-lane scalar round-trips (vector->scalar xor->vector) in the hot loop and fixed VLEN=128 (vsetvl_e64m1(2)), so VLEN>=256 cores only used half the width. On Spacemit X100 the Zvbc path measured ~450-600 MB/s, slower than the scalar Zbc path (~1.5 GB/s), making the "Zvbc preferred" dispatch a ~2.5x regression there. Rewrite rv_crc32c_vclmul: - adaptive VLEN: one e64m1 pair at VLEN>=256 (4 lanes) or two pairs at VLEN=128 (4 lanes carried on 2 vectors), so 128-bit cores run the vector path at full width; - pure-vector main loop: vlseg2e64 de-interleaved loads and vclmul_vx broadcast constants (k1..k4), zero scalar extraction; - all-vector reduction: single-element vector vclmul for the 4-to-1 lane merge and Barrett reduction, removing scalar-clmul dependencies (safe on cores with Zvbc but no scalar Zbc, e.g. SG2044); - same fold constants and math as the scalar core -> bit-exact. Correctness on k3: RFC3720 vectors (4 standard PASS), Extend composition, 70 boundary/misalign/large combos, and the official CRC.* gtest suite (5/5 PASSED) all bit-consistent across table/clmul/vclmul. Performance on k3 (X100, VLEN=256, 100-round median, same harness as PR3312): len PR3332 vclmul (MB/s) this (MB/s) speedup 1 KiB 578 5895 10.2x 4 KiB 590 9400 15.9x 64 KiB 600 11502 19.2x 1 MiB 508 11708 23.1x Signed-off-by: Xiaofei Gong <gongxiaofei24@iscas.ac.cn> Signed-off-by: YuanSheng <yuansheng@isrc.iscas.ac.cn> | 1 month ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Fix not to abort when checking the errorno with unicode string (#1142) | 4 years ago |
| | 3 years ago |
| butil: fix undefined behaviors (#3135) There are two kinds of problems: 1. signed number overflow is undefined behavior; 2. vsnprintfT may return E2BIG instead of EOVERFLOW. | 11 months ago |
| Support pass down request_id | 5 years ago |
| remove authors | 6 years ago |
| Fix tcp connect interrupt (#2664) * Fix tcp connect interrupt * Recalculate timeout | 2 years ago |
| Fix tcp connect interrupt (#2664) * Fix tcp connect interrupt * Recalculate timeout | 2 years ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| add license to file that missing it | 7 years ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Fix bazel build in macos testing on 11.0-bigsur | 5 years ago |
| Support LeakSanitizer (#3361) | 4 months ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| Rename base to butil to avoid potential naming conflicts | 9 years ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| Rename base to butil to avoid potential naming conflicts | 9 years ago |
| Rename base to butil to avoid potential naming conflicts | 9 years ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Rename base to butil to avoid potential naming conflicts | 9 years ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Support higher performance bvar with babylon counter (#3116) * Support higher performance bvar with babylon counter * Update documents | 1 year ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| remove authors | 6 years ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| rm duplicate comment | 2 years ago |
| butil: fix 'sucess' -> 'success' typos in process_util.h comments (#3272) Doc comments in src/butil/process_util.h read 'on sucess' (lines 31, 36). Fixed to 'on success'. Comment-only change. Signed-off-by: SAY-5 <SAY-5@users.noreply.github.com> Co-authored-by: SAY-5 <SAY-5@users.noreply.github.com> | 6 months ago |
| Support seqlock and use it for TaskGroup CPU time stat (#3541) | 2 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Rename base to butil to avoid potential naming conflicts | 9 years ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| Rename base to butil to avoid potential naming conflicts | 9 years ago |
| Support RDMA handshake protocol (#3350) * Support RDMA handshake protocol * Fix comment | 3 months ago |
| remove authors | 6 years ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Fix gflag namespace (#2877) | 1 year ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| Fix english typos (#2496) * Fix ploting -> plotting typo * Fix is not enable -> is not enabled typo * Fix allowd -> allowed typo * Fix paramters -> parameters typo * Fix reponse -> response typo * Fix seperated -> separated typo | 2 years ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| Rename base to butil to avoid potential naming conflicts | 9 years ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Optimize StringPiece memcmp/memchr for RISC-V with RVV (#3396) This patch adds RVV-accelerated memcmp and memchr for StringPiece operations on RISC-V 64-bit platforms. The implementation follows glibc's official RVV memcmp/memchr patterns: - e8m8 LMUL for maximum throughput - Hardware-adaptive vector length via vsetvl - vfirst.m for early-out on first difference/match Performance on SOPHGO SG2044 (RVV 1.0, VLEN >= 128, GCC 15.1): glibc 2.38 scalar memcmp (no RVV acceleration) as baseline. memcmp (worst-case full scan, 50000 iterations): 64 B: 20 ns -> 6 ns (3.4x) 256 B: 54 ns -> 15 ns (3.6x) 1 KB: 120 ns -> 55 ns (2.2x) 4 KB: 435 ns -> 225 ns (1.9x) 16 KB: 1968 ns -> 1258 ns (1.6x) 64 KB: 10962 ns -> 9044 ns (1.2x) 256 KB: 46893 ns -> 43108 ns (1.1x) 1 MB: 446161 ns -> 454717 ns (1.01x) memchr (worst-case full scan, 50000 iterations): 64 B: 5 ns -> 0.9 ns (5.8x) 256 B: 12 ns -> 3 ns (4.0x) 1 KB: 40 ns -> 12 ns (3.3x) 4 KB: 148 ns -> 44 ns (3.4x) 16 KB: 558 ns -> 158 ns (3.5x) 64 KB: 2150 ns -> 635 ns (3.4x) 256 KB: 9200 ns -> 2900 ns (3.2x) 1 MB: 39000 ns -> 13000 ns (3.0x) Correctness: - 59/59 expanded correctness tests passed (64B - 1MB) - string_piece_unittest: 24/24 passed - test_butil: 724/725 passed (1 pre-existing StackTrace failure) - test_bvar: 64/64 passed Files changed: - src/butil/string_compare_rvv.cc (new): RVV memcmp + memchr implementations - src/butil/strings/string_piece.h: RVV dispatch declarations - src/butil/strings/string_piece.cc: RVV dispatch in find(char) for memchr - BUILD.bazel: added string_compare_rvv.cc to BUTIL_SRCS - CMakeLists.txt: added string_compare_rvv.cc - Makefile: added string_compare_rvv.cc Signed-off-by: Xiaofei Gong <gongxiaofei24@iscas.ac.cn> Signed-off-by: YuanSheng <yuansheng@isrc.iscas.ac.cn> | 3 months ago |
| format | 3 years ago |
| string_printf support hint size of formatted string | 3 years ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| issue#346 move #include out of namespace butil | 8 years ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| Support a more safe read function and variadic functions of DoublyBufferedData (#2898) * Add a convenient and safe DoublyBufferedData::Read * Optimize and add a UT * Support variadic functions of DoublyBufferedData * Fix Fn copy | 1 year ago |
| add license to file that missing it | 7 years ago |
| remove authors | 6 years ago |
| remove authors | 6 years ago |
| Rename base to butil to avoid potential naming conflicts | 9 years ago |
| rename BASE_ prefixes to BUTIL_ to avoid potential conflicts | 8 years ago |
| Refactor NULL with nullptr in butil (#3444) | 3 months ago |
| remove authors | 6 years ago |