code wiki / _hdl_build / nx_gcc_race.nx
nx_gcc_race.nx
buildroot/runtime/_hdl_build/nx_gcc_race.nx
about
nx_gcc_race.nx -- the team's OWN capability to race a production compiler. Until now I
measured gcc by hand in a shell; that is not the team racing. This lets the TEAM do it:
it forks gcc -O2 to compile a C source, forks objdump to disassemble, and PARSES the
instruction count of the function body itself. With this, the team can race gcc on any
kernel, autonomously, and judge its own standing (win / tie / loss) -- the prerequisite
for hunting an EXCEED instead of me hand-picking targets. license_tier: ORIGINAL
dependencies 1 imports · 6 importers
imports: nx_syscalls.nx
imported by: nx_autorace_test.nxnx_boolhunt.nxnx_builder.nxnx_cost_race_test.nxnx_selfix_test.nxnx_team_tick.nx
structs
| none |
consts
| none |
functions
| 12 | func gr_gcc(cfile: *u8, ofile: *u8) -> i64 |
| 40 | func gr_exists(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 } called by 6: bool_hunt_onebd_build_onebd_diagnosecr_onegr_newest_gccsf_one calls 2: sys_openat_rdsys_close |
| 43 | func gr_newest_gcc() -> *u8 |
| 52 | func gr_gcc_v(gccpath: *u8, cfile: *u8, ofile: *u8) -> i64 |
| 80 | func gr_objdump(ofile: *u8, txtfile: *u8) -> i64 called by 3: gr_cost_objgr_race_cgr_race_cv calls 8: sys_mmapsys_forksys_openat_wrsys_dup3sys_closesys_execve+2 |
| 104 | func gr_match(buf: *u8, p: i64, lim: i64, lit: *u8) -> i64 |
| 109 | func gr_find(buf: *u8, blen: i64, needle: *u8) -> i64 |
| 118 | func gr_count(txtpath: *u8, fname: *u8) -> i64 |
| 167 | func gr_mnem_lat(buf: *u8, ms: i64, le: i64) -> i64 |
| 177 | func gr_func_cost(txtpath: *u8, fname: *u8) -> i64 |
| 218 | func gr_cost_obj(ofile: *u8, txtfile: *u8, fname: *u8) -> i64 |
| 224 | func gr_race_c(cfile: *u8, ofile: *u8, txtfile: *u8, fname: *u8) -> i64 |
| 231 | func gr_append_mnem(out: *u8, ol: i64, buf: *u8, ms: i64, me: i64) -> i64 called by 1: gr_func_mnemonics |
| 251 | func gr_func_mnemonics(txtpath: *u8, fname: *u8, out: *u8) -> i64 |
| 297 | func gr_race_cv(gccpath: *u8, cfile: *u8, ofile: *u8, txtfile: *u8, fname: *u8) -> i64 called by 6: bool_hunt_onebd_build_onebd_diagnosecr_onesf_onetk_run calls 3: gr_gcc_vgr_objdumpgr_count |