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).

Email-Like Inbox for Agentic Engineering

https://twitter.com/plannotator/status/2108589088139886769
1•ramoz•1m ago•0 comments

Scaling the Burden of Proof to the Cost a Claim Imposes

https://zenodo.org/records/23271710
1•skwasimin•1m ago•1 comments

Show HN: Clanking – Turn your coding agents' activity into a subtle soundscape

https://github.com/chrchr/clanking
1•chrchr•2m ago•0 comments

Anthropic and OpenAI wargaming public and political revolt after AI catastrophe

https://decrypt.co/380621/openai-anthropic-quietly-rehearsing-ai-catastrophe
1•thoughtpeddler•6m ago•0 comments

Faster Python startup with lazy imports

https://lemire.me/blog/2026/10/09/faster-python-startup-with-lazy-imports/
1•chmaynard•9m ago•0 comments

The logarithms of rational numbers have irrationality exponent 2 [pdf]

https://jdb19937.github.io/log-irrationality-measure/logmeasure.pdf
1•jdb1729•11m ago•1 comments

HostMath – Airbnb profit calculator with break-even occupancy and payback

https://hosttmath.ctonew.app/?src=hn
2•Hostmath•14m ago•0 comments

Compiling Rust to readable C with Eurydice

https://lwn.net/Articles/1055211/
1•peter_d_sherman•15m ago•0 comments

YouTube Video Shorts for PC

https://chromewebstore.google.com/detail/youtube-video-shorts-para/egnckcecfjkfefjbpdkhgjgggdhpgina
1•DevFunny•15m ago•0 comments

AI system submits false homicide tip to Philadelphia police

https://www.washingtonpost.com/technology/2026/10/09/ai-system-submits-false-homicide-tip-philade...
2•reaperducer•19m ago•0 comments

Argument from Ignorance

https://en.wikipedia.org/wiki/Argument_from_ignorance
2•suopspaces•20m ago•0 comments

Salesforce: AIForce Is Officially SIForce

https://twitter.com/Benioff/status/2108658674118111442
1•2OEH8eoCRo0•20m ago•1 comments

DNA Typewriter records cell lineage history of mouse: zygote–late organogenesis

https://www.science.org/doi/10.1126/science.ael0508
1•bookofjoe•20m ago•0 comments

The gene-regulatory evolution of the human skeleton

https://www.nature.com/articles/s41586-026-11053-x
1•wslh•23m ago•0 comments

Show HN: Programming Language Wars: a 2d game about language 0xbeef

http://github.avestura.dev/pl-wars/
1•avestura•23m ago•0 comments

A game where you rotate buildings to change gravity

https://store.steampowered.com/app/4590270/Fallgrade/
1•vladkudas•25m ago•0 comments

Jev Playground

https://jevplayground.com
1•RyanShook•28m ago•0 comments

Maybe the Rapture Is Here

https://www.noahpinion.blog/p/maybe-the-rapture-is-already-here
1•nozzlegear•29m ago•0 comments

Building an RL environment and dataset for legal

https://github.com/decover-tech/frontier-legal
1•ravitandon1990•30m ago•0 comments

Rewriting Prime Agent in Rust

https://www.primeintellect.ai/blog/prime-agent-rust
2•piotrgrabowski•37m ago•0 comments

I built a self-contained ship tracker for my girlfriend [video]

https://www.youtube.com/watch?v=lsG5w9Y8AuI
1•mkaic•38m ago•1 comments

How F1 cars collect data in real time [video]

https://www.youtube.com/watch?v=tosJ0j8K31c
2•vsskanth•39m ago•0 comments

Scottish artist marks 100 years of Schrödinger equation with new installation

https://physicsworld.com/a/scottish-artist-marks-100-years-of-schrodinger-equation-with-new-insta...
1•sohkamyung•42m ago•0 comments

Local LLM Inference at Scale with vLLM

https://data4sci.substack.com/p/local-llm-inference-at-scale-with
1•Anon84•43m ago•0 comments

Generalization Dynamics of LM Pre-Training

https://arxiviq.substack.com/p/generalization-dynamics-of-lm-pre
1•porridgeraisin•44m ago•0 comments

Boro: Nvidia's Open-Source Effort for AI-Assisted Linux Kernel Development

https://www.phoronix.com/news/NVIDIA-Boro-Linux-Kernel-AI
1•fratellobigio•44m ago•0 comments

Ask HN: Whats the first command you run on a new server?

1•fragmede•45m ago•0 comments

AI Could Allow for 3-Day Workweeks and Single-Income Households

https://www.forbes.com/sites/siladityaray/2026/10/08/jeff-bezos-claims-ai-could-allow-for-3-day-w...
1•oenton•46m ago•1 comments

Texas Man Sentenced to 30 Years for Moving Zines

https://newrepublic.com/article/213253/brother-sentenced-30-years-moving-box-zines-prairieland
1•convict•48m ago•0 comments

An experiment to glimpse the future Amazon rainforest

https://www.nature.com/immersive/d41586-026-02909-3/index.html
3•sohkamyung•49m ago•0 comments