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

Digital Exercise-Based Interventions for Balance in Older Adults (Meta-Analysis)

https://pmc.ncbi.nlm.nih.gov/articles/PMC13717434/
1•chavasorani•48s ago•0 comments

Excessive training alters tyrosine hydroxylase and dopamine homeostasis in mice

https://www.ibroneuroscience.org/article/S0306-4522(26)00535-X/fulltext
1•Noaidi•51s ago•1 comments

We built one harness for every agent, inspired by Ramp's Inspect

https://www.metaview.ai/resources/blog/how-we-built-one-harness-for-every-metaview-agent
1•ijlmond•59s ago•0 comments

It Took Me 4 Months to Build a Todo App with AI

https://rolisz.ro/2026/it-took-me-4-months-to-build-a-todo-app-with-ai/
1•rolisz•2m ago•0 comments

A complete (?) library of agent optimization methods

https://mahalsystems.ai/aot/optimizations/
1•jasondavis•4m ago•1 comments

Show HN: A Chrome extension to spot red flags Amazon isn't showing

https://chromewebstore.google.com/detail/hi-arthur/phbcjeeganjjjdkgohknifkmdbplhfeo
1•arthurisoffline•5m ago•1 comments

PocketCoded Java – A Java 21 IDE with Maven, Gradle, and Git for Android

https://play.google.com/store/apps/details?id=com.mkhokheli.pocketcodedjava&hl=en_US
1•MkhokheliNdebel•5m ago•0 comments

Statistics Are Aggregates

https://spiraldb.com/blog/statistics-are-aggregates
1•surprisetalk•6m ago•0 comments

HN: Langdex – A decentralized developer adoption index with a native token (DEK)

http://vamztshzx4gia3bzchhz5u3ozpadiwlq4fykhykmgqhxg25g2jbtntad.onion
1•NaelVask•6m ago•0 comments

Why Gulliver's Travels still speaks to the modern world, 300 years later

https://www.rte.ie/culture/2026/0622/1578511-why-gullivers-travels-still-speaks-to-the-modern-world/
2•NordStreamYacht•7m ago•0 comments

Solar: 100× Faster Solidity

https://www.paradigm.xyz/writing/solar-100-faster-solidity
1•torutofu•7m ago•0 comments

Vibe Coded AO3 Clone Down, Fanfic Authors Buried It with 2000 Takedown Notices

https://www.404media.co/vibe-coded-ao3-clone-site-down-after-fanfic-authors-buried-it-with-2-000-...
2•Frieren•7m ago•0 comments

I Just Wanted Gmail Notifications, So Claude Built Me an App

https://twitter.com/BourAbdelhadi/status/2117615310983373164
2•babdelhadi•8m ago•1 comments

Show HN: LinguaFlick – An application for learning Chinese based on vocabulary

https://linguaflick.com/
1•Tomoe721•13m ago•0 comments

Valve Removed Steam Deck from Steam

https://store.steampowered.com/steamdeck
1•shoaloak•13m ago•0 comments

An Endless Stream of AI Slop: The Burden of AI-Assisted Software Development

https://arxiv.org/abs/2603.27249
1•jxntb73•15m ago•0 comments

Amsterdam School

https://architecture-history.org/schools/AMSTERDAM%20SCHOOL.html
1•bondarchuk•15m ago•0 comments

Whither Tartaria?

https://www.astralcodexten.com/p/whither-tartaria
1•bondarchuk•16m ago•0 comments

Transformers Model Integration Contracts

https://huggingface.co/blog/transformers-mic
1•Brajeshwar•16m ago•0 comments

PostgreSQL on a VM: Which One to Choose?

https://3hcloud.com/blog/postgresql-vm-storage-tier
2•Liriel•16m ago•0 comments

The Moon may have squeezed Earth's first continents into existence

https://www.science.org/content/article/moon-may-have-squeezed-earth-s-first-continents-existence
1•Brajeshwar•16m ago•0 comments

Prove you are not a child

https://idiallo.com/blog/prove-you-are-not-a-child
2•Brajeshwar•16m ago•0 comments

Social upheaval: The Overshoot Loop

https://jayhansonsdieoff.net/overshoot-loop-evolution-under-the-maximum-power-principle/
1•doitLP•19m ago•0 comments

Power Is Not Personality: Why India's Republic Outlives Every Idol

https://write.as/lots7b8x9lf2m
1•sagarshetty•20m ago•1 comments

The Role of UX in Agentic Software Factories

https://www.nngroup.com/articles/ux-agentic-software-factories/
2•TonyAlicea10•20m ago•0 comments

Critical thinking when agents do the work

https://twitter.com/addyosmani/status/2117512471930167377
2•taubek•21m ago•0 comments

The last, best hope for space tourism just rolled onto a runway in Arizona

https://arstechnica.com/space/2026/10/the-last-best-hope-for-space-tourism-just-rolled-onto-a-run...
2•rbanffy•23m ago•0 comments

Fossil fuels played a negligible role in the rise of atmospheric CO₂

https://twitter.com/cohler/status/2102716898408280330
3•bilsbie•24m ago•3 comments

Regulators Take over as Paraguay's Ueno Bank Falters

https://www.theparaguaypost.com/p/regulators-take-over-paraguay-ueno-bank
2•haunter•25m ago•0 comments

Program

https://schmud.de/posts/2026-11-02-program.html
2•surprisetalk•26m ago•0 comments