frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•1y ago
I'd like to do some statistics over the machine code gcc generates, such as a histogram of used instructions, average volatile/preserved registers usage of functions etc. For now just x86_64 SysV-ABI would be enough.

However I'm not aware of any pre-existing tool that lets me easily do this. The options I currently see are either make gcc output assembly and write a parser for the GNU Assembler format (possibly by reusing the asm-parser of the compiler-explorer project), or write a tool that reads (disassembles) object files directly using elfutils.

Any hints, prior work, further ideas, links to useful resources, or any other kind of help would be much appreciated.

Comments

baobun•1y ago
"Static analysis" should be a relevant search term. Assuming you don't need to tie the instructions back to C code then the "gcc" part seems circumstancial for implementation? I guess you might want to parse the ASM into an Abstract Syntax Tree (AST) represenation and work on that?

If you do want to tie it back to the source, this looks relevant: http://icps.u-strasbg.fr/~pop/gcc-ast.html

phafu•1y ago
For my purpose I don't need to get back to the original source, no.

The gcc part is only relevant with regards to what dialect of assembler I need to parse. If I go that route, I'd write a parser for the GNU assembler, and that would of course work with any code in that dialect, regardless from which compiler it came from (I haven't checked whether other compilers can produce GNU assembler though).

PRINTABLE.MD

https://printable.md/
1•drorwolmer•2m ago•0 comments

The Five Stages of Being Replaced by Your Autocomplete

https://www.vincentschmalbach.com/five-stages-of-being-replaced-by-your-autocomplete/
1•vincent_s•3m ago•0 comments

PIZD, a Rust compressor exploring structural deduplication

https://pizd.spedo.dev/
1•torxx666•6m ago•0 comments

How to Start a Defence Tech Startup in the UK: Part 1

https://foxandlion.pub/analysis/how-to-start-a-defence-tech-startup-in-the-uk-part-1
3•fascinnn•7m ago•0 comments

A React component for building Web forms from JSON Schema

https://github.com/rjsf-team/react-jsonschema-form
1•saikatsg•9m ago•0 comments

Show HN: Continue Your Google AI Mode Chats in Gemini/Claude

https://chromewebstore.google.com/detail/relay-continue-google-sea/fjjfadgooapnegipjocinojjhaajghag
1•mahami•12m ago•0 comments

Probably NOT use the Linux eBPF/Rust XDR I built alone

https://github.com/visiongaiatechnology/gedefense
1•visiongaiatech•13m ago•0 comments

Nvidia Eyes Software Revenue with a $2k per GPU Yearly Figure from Huang

https://www.techpowerup.com/354113/nvidia-eyes-software-revenue-with-a-usd-2-000-per-gpu-yearly-f...
1•theanonymousone•17m ago•0 comments

RTX 4000 Pro Blackwell SFF performance hacks

https://piszczek.pl/blog/rtx-pro-4000-blackwell-sff-120w-qwen-benchmark
1•jacquesm•19m ago•0 comments

A tiny app for C# dotnet design Window Form

https://github.com/macauhome/winform-designer
1•macauhome•19m ago•0 comments

Thiel's leaked lectures on the end of the world

https://www.theverge.com/tech/1014252/peter-thiel-antichrist-lectures-analysis
1•izhak•19m ago•0 comments

Show HN: pw-repl – A Playwright-powered REPL for you and your agents to share

https://github.com/arcanemachine/pw-repl
1•arcanemachiner•20m ago•0 comments

Notes on loneliness (Tommy Dixon)

https://www.tommydixon.ca/p/notes-on-loneliness
1•xen_relay•22m ago•0 comments

I translated North Korean pop into American [video]

https://www.youtube.com/watch?v=nlSSyPXQ2i4
1•nxobject•23m ago•0 comments

HackDigest: Daily three-sentence news summaries in Korean or English

https://minjungsung.github.io/hackdigest/
1•minjungsung1994•23m ago•0 comments

China's tech giants are paying 1M yuan for a new kind of AI engineer

https://www.scmp.com/tech/tech-trends/article/3371925/chinas-tech-giants-are-paying-1-million-yua...
2•01-_-•30m ago•0 comments

Peter Thiel says Apple has done 'nothing new' after Steve Jobs

https://www.businessinsider.com/peter-thiel-apple-steve-jobs-tim-cook-innovation-iphone-duo-2026-10
1•01-_-•31m ago•0 comments

MustardOS is custom firmware (CFW) for handheld gaming devices

https://muos.dev/
1•fork-bomber•33m ago•0 comments

PyMagic a tiny DSL to write models/specs in Python

https://pypi.org/project/pymagic-models/
1•caotic123•37m ago•1 comments

Slavoj ŽIžek: Only Desperation Can Save Us from Ecology, AI, and War [video]

https://www.youtube.com/watch?v=_0LSqRzpxhU
1•asilis•40m ago•0 comments

Blackwell Brings NUMA Back, Inside One GPU

https://vincentzed.com/writing/blackwell-numa
1•frostbyte7•40m ago•0 comments

Show HN: Hazzel – A terminal coding harness that stays small on purpose

https://github.com/mukundzha/hazzel
1•mukundjha1•41m ago•0 comments

Show HN: Tabverse – a free, open-source, with self-hostable server Workona clone

1•liyu1981au•44m ago•0 comments

Ask HN: Did crates.io stop processing new crate publishes?

1•davvid•45m ago•1 comments

Aw1-breaker – Sub-millisecond AST circuit breaker for AI agent tool calls

1•MvikVela•46m ago•0 comments

Data-Oriented Design in Yuku's Parser

https://www.arshad.fyi/writings/data-oriented-design-in-yukus-parser
1•fagnerbrack•47m ago•0 comments

Raspberry Pi Pico W Irrigation – Telegram and Google Calendar All on Pico

https://github.com/AdrianCX/picohive-irrigation
2•AdrianCX•50m ago•0 comments

Rosettes and Other Hidden Traces of Hamburg's Tram

https://alsterrunde.com/rosettes-and-other-hidden-traces-of-hamburgs-tram/
1•mertbio•54m ago•0 comments

A cool 3D interactive demo of neuroevolution with supermario

https://github.com/vahmoh/NeuroMario
2•gbays3•56m ago•0 comments

Science could lift Italy's sinking cities back up

https://www.repubblica.it/en/europe/news/2026/10/26/news/subsidence_in_italy_venice_and_ravenna_a...
2•simonebrunozzi•1h ago•0 comments