frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•9mo 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•9mo 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•9mo 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).

Show HN: Global Issue Memory MCP – Stack Overflow for Your Coding Assistant

https://www.usegim.com/
1•nonekme•41s ago•0 comments

Learn C++ by Example • Frances Buontempo and Matt Godbolt

https://www.youtube.com/watch?v=PXKICIiXEUM&list=PLEx5khR4g7PJbSLmADahf0LOpTLifiCra
1•birdculture•1m ago•0 comments

OpenAI Is Betting on a Security Nightmare

https://julsimon.substack.com/p/openai-is-betting-on-a-security-nightmare
1•doener•2m ago•0 comments

Show HN: CSS Agent Garden – AI agents style one HTML page via MCP

https://css-agent-garden.fly.dev/
1•codecoded•5m ago•0 comments

That irritating feeling France was right – US makes Gaullism respectable again

https://www.economist.com/europe/2026/02/18/that-irritating-feeling-that-france-was-right
3•saubeidl•7m ago•1 comments

What is the probability of a coin landing on its edge?

1•vivzkestrel•7m ago•0 comments

I accidentally managed to uncover the system prompt of Google Gemini 3 Flash

https://pastebin.com/wMPqrmsw
1•errorcodezero•9m ago•0 comments

Show HN: ModelWar – CoreWars for Agents

https://modelwar-delta.vercel.app
1•pj4533•9m ago•0 comments

When to Vibe Code?

https://www.youtube.com/watch?v=TkRkLBcm9D4
1•grahamlee•9m ago•0 comments

Challenging the Single-Responsibility Principle

https://kiss-and-solid.com/blog/keep-it-simple
1•WolfOliver•11m ago•0 comments

The 8KB Page: PostgreSQL Page Layout Visualized

https://boringsql.com/visualizers/8kb-page/
1•radimm•12m ago•0 comments

Regulated Crypto Investigation Team – Intelligence Cyber Wizard Services

1•Robertjoe•12m ago•0 comments

Measuring Input-to-Photon Latency (Because 'Wayland Feels Off' Isn't a Metric)

https://davidjusto.com/articles/m2p-latency/
1•rhim•15m ago•0 comments

Chat with Llamma 8B at 16,000 TPS

https://chatjimmy.ai/
1•nl•20m ago•0 comments

Llamma 3.1 8B in hardware, 16,000 TPS

https://taalas.com/products/
2•nl•21m ago•0 comments

MD5 Algorithm Explainer

https://md5algorithm.vercel.app/
1•fanweixiao•22m ago•0 comments

The Gemini Servility Trap

1•gemfan•22m ago•0 comments

RFC 2295 – Transparent Content Negotiation in HTTP

https://datatracker.ietf.org/doc/html/rfc2295
1•locknitpicker•23m ago•0 comments

How did I revolutionized my productivity using OpenClaw

https://clawhub.ai/Quarantiine/effortlist-ai
1•daniel_ward•23m ago•0 comments

PostgreSQL's 8KB Page

https://boringsql.com/posts/inside-the-8kb-page/
2•radimm•29m ago•0 comments

Database table is an awful API

https://www.innoq.com/en/blog/2026/02/your-database-table-is-an-awful-api/
1•Ookami86•29m ago•0 comments

Donut Lab Announces Upcoming Independent Battery Measurements

https://www.donutlab.com/measurement-reports-announcement/
2•peritpatrio•29m ago•0 comments

We built a desktop AI agent that runs commands locally

https://desktopcommander.app/
1•rkrizanovskis•30m ago•1 comments

Tariffs paid by midsize US companies tripled last year JPMorganChase study shows

https://apnews.com/article/trump-tariffs-midsized-companies-costs-consumers-2a25158ff1d06bd7f72d9...
1•petethomas•32m ago•0 comments

What Developers Actually Need to Know Right Now

https://www.oreilly.com/radar/what-developers-actually-need-to-know-right-now/
1•asplake•33m ago•0 comments

Did a prize-winning novelist steal a woman's life story?

https://www.theguardian.com/books/2026/feb/17/did-a-prize-winning-novelist-steal-a-woman-life-sto...
1•brandonlc•40m ago•0 comments

Gay men have long been rumored to run Silicon Valley - WIRED investigates

https://www.wired.com/story/inside-the-gay-tech-mafia/
4•helloplanets•43m ago•0 comments

How AI Is Rewiring Winemaking and Wine Collecting - Shirley M. Mueller M.D.

https://www.psychologytoday.com/us/blog/the-mind-of-a-collector/202602/how-ai-is-rewiring-winemak...
2•omkar-foss•47m ago•1 comments

GPU Rack Power Density, 2015–2025

https://syaala.com/blog/gpu-rack-density-timeline-2026
1•jaynamburi•50m ago•1 comments

Lessons from Building Claude Code: Prompt Caching Is Everything

https://twitter.com/trq212/status/2024574133011673516
1•tosh•51m ago•0 comments