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

High-performance Go to TypeScript transpiler

https://github.com/s4wave/goscript
1•aperturecjs•36s ago•0 comments

MCP server for Hyperliquid trading perps

https://github.com/Dakkshin/hyperliquid-mcp
1•Dakkshin•5m ago•0 comments

A CIRCT (Circuit IR Compilers and Tools) Project Tutorial

https://samuelcoward.co.uk/blog/2026/demo/
1•matt_d•7m ago•0 comments

9lives – Self-healing test runner that refuses to mask real bugs (

https://github.com/Quality-Max/9lives
1•ruslan_qm•8m ago•1 comments

Inside HackerRank's LLM-based Hiring Agent

https://blog.grandimam.com/posts/how-hacker-rank-scores-engineers/
1•grandimam•8m ago•0 comments

LazyCamHUD – daily video logs with a sci‑fi HUD, like in The Martian

https://github.com/hieuha/LazyCamHUD
1•hieuha•10m ago•0 comments

Learned helplessness at fifty: Insights from neuroscience

https://pubmed.ncbi.nlm.nih.gov/27337390/
2•JumpCrisscross•14m ago•0 comments

Rate Limiting for a Hosting Product

https://www.contentstack.com/blog/tech-talk/the-invisible-shield-how-contentstack-launch-protects...
3•sidcool•15m ago•0 comments

Ryanair passenger partially sucked out of window on flight from Greece

https://www.reuters.com/business/ryanair-plane-makes-emergency-landing-greece-after-window-dislod...
2•skibz•18m ago•0 comments

We Are Officially Beginning the Process to Convene Grand Juries over DOGE

https://cmarmitage.substack.com/p/we-are-officially-beginning-the-process
1•JumpCrisscross•21m ago•0 comments

Reflect Orbital: The Sunlight Company

https://www.reflectorbital.com
1•mparramon•21m ago•0 comments

Wall Street's booming $1T 'synthetic risk transfer' phenomenon

https://www.ft.com/content/d91d35fc-93ab-4963-8587-7a00fe5c63b4
1•JumpCrisscross•24m ago•0 comments

Competitive Programming in the Era of AI

https://www.vibhaas.net/posts/Competitive-Programming-in-the-era-of-AI/
1•m-novikov•27m ago•0 comments

GPT 5.6 Ultra better in Claude Code than in Codex?

https://twitter.com/theo/status/2075776733626892542
2•rstagi•30m ago•1 comments

8 Stages of AI engineering maturity: a framework for teams

https://upsun.com/blog/8-stages-ai-engineering-maturity/
1•cribwi•33m ago•0 comments

How AI is rewiring childhood

https://www.economist.com/leaders/2025/12/04/how-ai-is-rewiring-childhood
1•pretext•37m ago•0 comments

Weak hands and blurry vision: Is your tech giving you 'phone body'?

https://www.bbc.com/future/article/20260630-is-your-tech-giving-you-phone-body
2•breve•41m ago•0 comments

AlkaLean ReviEwS (2026): We Tried It My Honest Review

https://gamma.app/embed/AlkaLean-ReviEwS-2026-We-Tried-It-My-Honest-Review-xfitipfhzgxwhbd
1•wakyfarx•46m ago•0 comments

From Architecture to 3D Editor: My Shift from Design to Programming

https://alexsyniakov.com/2026/07/11/programs-not-objects-how-i-stopped-designing-architecture-and...
1•birdculture•47m ago•0 comments

Why is Starlink so big?

https://www.fool.com/investing/2026/06/29/spacex-secret-launch-subsidy-makes-starlink-profit/
2•sawyers•48m ago•3 comments

Sperm donors need limits, says a European fertility group

https://www.technologyreview.com/2026/07/10/1140289/sperm-donors-need-limits-says-a-european-fert...
1•joozio•50m ago•0 comments

Give it five minutes (2015)

https://medium.com/signal-v-noise/give-it-five-minutes-b8115d6f2361
2•tosh•51m ago•0 comments

Beating every possible game of Pokemon Platinum at the same time [video]

https://www.youtube.com/watch?v=jNMWkD5VsZ8
1•Imustaskforhelp•58m ago•0 comments

This Week in Plasma: Audio Recording in Spectacle

https://blogs.kde.org/2026/07/11/this-week-in-plasma-audio-recording-in-spectacle/
1•HieronymusBosch•1h ago•0 comments

The allergy culprit histamine also boosts our memory

https://www.newscientist.com/article/2533166-the-allergy-culprit-histamine-also-boosts-our-memory/
2•XzetaU8•1h ago•1 comments

Java local AI client and MCP orchestrator without the Python dependency hell

https://ypipe.com/
1•ruoku•1h ago•0 comments

Ask HN: How are you controlling Token Costs?

2•jainojas•1h ago•0 comments

MuseAir hash: new fastest high-quality portable hashing algorithm

https://github.com/eternal-io/museair
1•eternal-io•1h ago•0 comments

SAP concedes to EU, freeing CIOs from expensive support shackles

https://www.cio.com/article/4195520/sap-concedes-to-eu-freeing-cios-from-expensive-support-shackl...
4•thibautg•1h ago•0 comments

Europe's slow electrification is a 'major mistake', warns IEA chief

https://www.ft.com/content/fbeb7df0-41fb-4981-8d78-01c7a95d3ed6
3•JumpCrisscross•1h ago•1 comments