mirror of
https://github.com/radareorg/r2xsql.git
synced 2026-11-07 06:36:02 -10:00
Describe measurements instead of pointing at research outside this repo
Comments pointed at research notes, named by directory and file, that a reader of this repository cannot open. The measurements are kept; only the pointers go.
This commit is contained in:
1 parent
c46ccb42b6
commit
2618735bd4
7 files changed
+25
-28
No files matched your search
+11
-12
@@ -185,8 +185,8 @@ struct BlockData {
|
||||
// sliced by `asmop.size` (a SEPARATE ASM-side decode, `r_asm_disassemble`).
|
||||
// This producer calls only `r_anal_op` (never `r_asm_disassemble` -- that
|
||||
// call exists purely to build the mnemonic), reading `bytes` from its own
|
||||
// per-block/per-range read buffer sliced by `op.size` -- `instructions-api-
|
||||
// lab/FINDINGS.md` measured the two decoders never disagreeing on length or
|
||||
// per-block/per-range read buffer sliced by `op.size` -- measured, the two decoders never
|
||||
// disagreed on length or
|
||||
// on which addresses fail to decode, across five real/generated fixtures,
|
||||
// but this is a live risk to keep in mind if a future radare2 arch plugin
|
||||
// ever changes that.
|
||||
@@ -284,7 +284,7 @@ struct FlagRow {
|
||||
// `RBinString` at all -- it is resolved per row via `r_bin_get_section_at`;
|
||||
// `vaddr` is rebased through `r_bin_get_vaddr`, not read off the raw member;
|
||||
// `type` is rendered through `r_bin_string_type`, not the raw char code.
|
||||
// Measured in a private lab at 26-86x across a real PE, a large generated
|
||||
// Measured at 26-86x across a real PE, a large generated
|
||||
// fixture, and a real large DLL, with exact field parity.
|
||||
struct StringRow {
|
||||
int64_t addr = 0;
|
||||
@@ -304,7 +304,7 @@ struct StringRow {
|
||||
// (`r_str_srwx_i`), not the raw permission bitmask, and `addr` silently
|
||||
// downgrades to NO rebase for a section lacking the READ permission bit --
|
||||
// a real per-row branch on the section's own `perm`, not a fixed `va` mode
|
||||
// for the whole table. Measured in a private lab at 19-58x (`sections`) and
|
||||
// for the whole table. Measured at 19-58x (`sections`) and
|
||||
// 58-195x (`segments`, vacuous on every PE fixture tested -- no PE section
|
||||
// sets `is_segment`, so this rides `sections`' proven-live shared producer)
|
||||
// with exact field parity.
|
||||
@@ -326,7 +326,7 @@ struct SectionRow {
|
||||
// `RBinInfo::has_lit`. All of this goes through PUBLIC `R_API` calls, never
|
||||
// a private/static helper -- the producer calls the same functions the
|
||||
// emitter calls, it does not reimplement demangling or address resolution.
|
||||
// Measured in a private lab at 10-13x across a real PE, a large generated
|
||||
// Measured at 10-13x across a real PE, a large generated
|
||||
// fixture, and a real 1986-import DLL, with exact field parity (the
|
||||
// genuine C++-demangling branch itself is unexercised by any available
|
||||
// fixture -- radare2 is a C codebase, so every fixture's imports are
|
||||
@@ -342,9 +342,8 @@ struct ImportRow {
|
||||
|
||||
// One row of `comments` -- the command path's `CCj`, a single full-scan
|
||||
// command (not an N+1-per-function shape, unlike `funcs`/`xrefs`/`locals`/the
|
||||
// blocks cluster -- the same "one command already" shape `binary-meta-lab`
|
||||
// found for `strings`/`sections`/`imports`/`entries`). Measured in a private
|
||||
// lab at 5-70x with exact field parity, including two quirks found by
|
||||
// blocks cluster -- the same "one command already" shape measured for
|
||||
// `strings`/`sections`/`imports`/`entries`). Measured at 5-70x with exact field parity, including two quirks found by
|
||||
// reading `r_meta_print` (`libr/anal/meta.c`) rather than assumed from the
|
||||
// struct:
|
||||
//
|
||||
@@ -376,7 +375,7 @@ struct CommentRow {
|
||||
// (exports), merged by address (this project's own `merge_row`, preserved
|
||||
// exactly on the API leg). `iej`'s JSON never emits `name`/`size`/`bind`
|
||||
// (confirmed by reading `bin_entry`'s JSON block field-by-field) but DOES
|
||||
// emit `type` via `r_bin_entry_type_string` -- an early lab probe omitted
|
||||
// emit `type` via `r_bin_entry_type_string` -- an early probe omitted
|
||||
// this and showed a real parity failure before the producer was corrected.
|
||||
// `entries.name` is NOT the demangled name despite living one call away from
|
||||
// a full demangling pipeline: reading `bin_symbols`' JSON emit block found
|
||||
@@ -384,7 +383,7 @@ struct CommentRow {
|
||||
// name), UTF8-escaped -- the demangled form goes to a separate `"demname"`
|
||||
// key this table never reads. `its_an_export` (`!is_imported && bind ==
|
||||
// "GLOBAL"`) is a private/static helper in radare2 but trivial to reproduce
|
||||
// without calling it. Measured in a private lab at 9-78x across a real PE,
|
||||
// without calling it. Measured at 9-78x across a real PE,
|
||||
// a large generated fixture, and a real 755-export DLL, with exact
|
||||
// field parity.
|
||||
struct EntryRow {
|
||||
@@ -625,7 +624,7 @@ class Api {
|
||||
// `fi->{addr,size,name,realname,space->name}` directly -- no `fs`
|
||||
// selection, no per-space re-listing, no session-state save/restore at
|
||||
// all, since `r_flag_foreach` is not scoped by the currently-selected
|
||||
// flagspace the way the `fj` COMMAND is. Measured in a private lab at
|
||||
// flagspace the way the `fj` COMMAND is. Measured at
|
||||
// 17-47x on a full scan across a real binary and generated fixtures, plus
|
||||
// a real large DLL, with exact field parity -- including the pointer-
|
||||
// equality `realname` quirk -- before being ported.
|
||||
@@ -667,7 +666,7 @@ class Api {
|
||||
//
|
||||
// Unlike every READ producer above (an N+1-per-row scan, where command
|
||||
// dispatch is paid once per row), a single write is one command either
|
||||
// way -- there is no N+1 shape to collapse. A private standalone lab
|
||||
// way -- there is no N+1 shape to collapse. A benchmark
|
||||
// measured a BULK workload instead (N repeated writes in a loop,
|
||||
// simulating a bulk-rename/bulk-annotate script) and found each of the
|
||||
// four operations examined pays a real, per-call fixed cost for
|
||||
|
||||
@@ -1085,7 +1085,7 @@ class LibrApi : public Api {
|
||||
// `func_addr` stays 0 on every row here). Refills its read buffer from IO
|
||||
// whenever fewer than 32 bytes remain -- the same low-water threshold the
|
||||
// command path's own `pdj` loop uses (`disasm.c`, `i >= nb_bytes - 32`,
|
||||
// confirmed by `pd-range-lab`), since the longest x86 instruction is under
|
||||
// confirmed by measurement), since the longest x86 instruction is under
|
||||
// 16 bytes and every other arch this project targets is shorter still.
|
||||
void instructions_range(int64_t start_addr, int64_t count,
|
||||
std::vector<InsnRow>& out) override {
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
//
|
||||
// The WRITE path (this table's `text` UPDATE and INSERT) is ALSO now
|
||||
// C-API-backed on the libr flavor, a separate, later port from both of the
|
||||
// above: a private standalone lab measured a bulk workload (N=500 repeated
|
||||
// above: a benchmark measured a bulk workload (N=500 repeated
|
||||
// sets, simulating a bulk-annotate script) at 30-40x over the CMD leg
|
||||
// (`r_core_call_str_at("CCu base64:...")`, the SAME dispatch this table
|
||||
// already issues), with exact field/behavior parity once the API leg
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
// A full scan is that same enumeration: one `fj` (full dump) + one
|
||||
// `fs <name>; fj; fs *` PER FLAGSPACE to attribute the real space back onto
|
||||
// each flag by name. On the libr backend this reads `r_flag_foreach` directly
|
||||
// instead — measured in a private lab at 17-47x on a full scan across a real
|
||||
// instead — measured at 17-47x on a full scan across a real
|
||||
// binary, this project's own scale fixtures, and a real large DLL, with exact
|
||||
// field parity (including a pointer-equality quirk in radare2's own
|
||||
// `realname` field), before being ported (see `direct.hpp` for why the second
|
||||
@@ -61,7 +61,7 @@
|
||||
// unbuilt and is not needed here.
|
||||
//
|
||||
// The rename is ALSO now C-API-backed on the libr flavor, a separate, later
|
||||
// port from the cmd_noeval rollout above: a private standalone lab
|
||||
// port from the cmd_noeval rollout above: a benchmark
|
||||
// measured a bulk workload (N up to 500 repeated renames, simulating a
|
||||
// bulk-rename script) at 48-62x over the CMD leg (the SAME
|
||||
// `r_core_call_str_at("fr ...")` dispatch this table already issues), with
|
||||
|
||||
@@ -20,8 +20,7 @@
|
||||
// pilot of this dispatch.
|
||||
//
|
||||
// `name`'s rename is explicitly REFUSED a C-API port, unlike the sibling
|
||||
// rename/set writes on `comments`/`flags`/`locals` (measured together in a
|
||||
// private standalone lab). Not a speed question — `afn`'s bulk-rename
|
||||
// rename/set writes on `comments`/`flags`/`locals` (measured together). Not a speed question — `afn`'s bulk-rename
|
||||
// cost clears the same 3x bar the others did. The refusal is PARITY: reading
|
||||
// `afn`'s actual handler (`__setFunctionName`, `cmd_anal.inc.c`) found it
|
||||
// does substantially more than `r_anal_function_rename` alone —
|
||||
@@ -32,12 +31,12 @@
|
||||
// reads back through `afcf`;
|
||||
// * it fires the `on_fcn_rename` callback.
|
||||
// `r_anal_function_rename` touches ONLY the function's own name field and
|
||||
// hashtable entries — none of the above. The write-path lab proved this
|
||||
// live, not just from the source read: after an equal-sized bulk rename on
|
||||
// hashtable entries — none of the above. Measured live, not just
|
||||
// read from the source: after an equal-sized bulk rename on
|
||||
// two independent cores, the CMD leg's flag was renamed on 100% of rows and
|
||||
// the API leg's flag was renamed on 0% — a real, silent desync between
|
||||
// `funcs.name` and its own backing flag, the exact bug class already fixed
|
||||
// once this session for `flags.name` (`afn` creating a duplicate flag
|
||||
// for `flags.name` (`afn` creating a duplicate flag
|
||||
// instead of renaming in place). Porting this write would require
|
||||
// reimplementing `__setFunctionName` in full, which is not a "call the C
|
||||
// API instead" port at all — it is copying that problem in reverse. Stays
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
//
|
||||
// A full scan enumerates functions (`aflj`) and pulls each one's vars
|
||||
// (`afvj @ <addr>`). On the libr backend this reads `fcn->vars` directly
|
||||
// instead — measured in a private lab at 50-780x on a full scan across a real
|
||||
// instead — measured at 50-780x on a full scan across a real
|
||||
// binary and generated fixtures, with exact field parity, before being ported
|
||||
// (see `direct.hpp` for why the second producer lives in another TU). The
|
||||
// command path remains the only implementation r2pipe can have, and it also
|
||||
@@ -26,13 +26,13 @@
|
||||
//
|
||||
// The WRITE side (this table's `name` rename and `type` retype) is ALSO now
|
||||
// C-API-backed on the libr flavor, a separate, later port from the read-side
|
||||
// scan above: a private standalone lab measured a bulk workload (N
|
||||
// scan above: a benchmark measured a bulk workload (N
|
||||
// repeated renames/retypes, simulating a bulk-retype script) at 78-150x over
|
||||
// the CMD leg. Reading `cmd_anal.inc.c`'s `afvn`/`afvt` handlers found each is
|
||||
// nothing more than `r_anal_function_get_var_byname` + `r_anal_var_rename`/
|
||||
// `r_anal_var_set_type` — the SAME calls the API leg makes directly, with no
|
||||
// other side effect (unlike `funcs.name`'s `afn`, refused for exactly this
|
||||
// reason on that table) — so parity is exact, proven live in the lab. The
|
||||
// reason on that table) — so parity is exact, proven live. The
|
||||
// single-function readback (`local_readback_matches`, below) stays
|
||||
// command-based on BOTH legs, same as `funcs`'/`flags`' own per-write
|
||||
// readbacks — this port only moves the WRITE call itself. On every non-libr
|
||||
|
||||
@@ -2,10 +2,9 @@
|
||||
# sqlite3/nlohmann). It ships no meson.build of its own (CMake-native),
|
||||
# so the packagefiles/ overlay below supplies one for the meson build path.
|
||||
#
|
||||
# In the monorepo, prefer the editable sibling checkout instead of this fetch by
|
||||
# pointing meson at it: meson setup build-meson -Dlibxsql:... (or drop a
|
||||
# subprojects/libxsql/ checkout in place; meson uses a present directory over the
|
||||
# wrap). For a standalone/public build this fetches the same source CMake does.
|
||||
# When developing against a local libxsql, prefer that checkout over this fetch:
|
||||
# drop it in as subprojects/libxsql/ and meson will use the present directory in
|
||||
# preference to the wrap. Otherwise this fetches the same source CMake does.
|
||||
[wrap-git]
|
||||
url = https://github.com/0xeb/libxsql.git
|
||||
revision = main
|
||||
|
||||
Reference in new issue
Block a user