frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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

Travel back to 1998 and use Lovable on Windows 98

https://www.sinalytica.com/
1•teddyX•3m ago•0 comments

Ahoy, DECmate II the little PDP-8 that could

http://oldvcr.blogspot.com/2026/05/ahoy-decmate-ii-little-pdp-8-that-could.html
1•TMWNN•5m ago•0 comments

Building a LangGraph pipeline for production data engineering

https://labyrinthanalyticsconsulting.com/blog/building-first-langgraph-pipeline
2•labyrinthAC•9m ago•0 comments

Peter Thiel's Move to Argentina Reflects Billionaire Trend

https://www.businessinsider.com/peter-thiel-argentina-billionaire-moving-abroad-2026-5
2•nreece•23m ago•0 comments

Microsoft NetMeeting was more important than you think [video]

https://www.youtube.com/watch?v=qhay6VryyvE
1•jervant•26m ago•0 comments

Just for fun, generate your websites alter ego

https://webalterego.com
1•pointscard•26m ago•1 comments

Ghostbase – describe an agent in plain English, it runs on a webhook or cron

https://ghostbase.ai/
1•florianberisha•38m ago•0 comments

Cancer jab can eradicate tumours in patients, trial shows

https://www.theguardian.com/science/2026/may/30/cancer-jab-can-eradicate-entire-tumours-in-patien...
4•Teever•38m ago•0 comments

If Windows were designed today, would the Registry exist? [video]

https://www.youtube.com/watch?v=bkrbew3Ls60
4•LelouBil•41m ago•1 comments

86Box v6.0

https://86box.net/2026/05/31/86box-v6-0.html
1•chungy•44m ago•0 comments

Open models lag closed models by 4 months

https://epoch.ai/data-insights/open-closed-eci-gap
3•intelkishan•45m ago•1 comments

Adverse childhood experiences and risk of mental disorders: A systematic review

https://www.sciencedirect.com/science/article/pii/S0001691826007559
3•rendx•55m ago•0 comments

The Digital Maieutic: Socrates and the Art of Prompting

https://forum.effectivealtruism.org/posts/qsG9LwjD9ZAERiTFc/the-digital-maieutic-socrates-and-the...
1•rramadass•55m ago•1 comments

Hydrogen and oxygen make water [video]

https://www.youtube.com/watch?v=UV8KbQyF228
1•tripdout•1h ago•0 comments

Scaling Laws Meet Model Architecture: Toward Inference-Efficient LLMs

https://arxiv.org/abs/2510.18245
1•matt_d•1h ago•0 comments

Show HN: Live, system-wide USB transfer sniffer in eBPF

https://github.com/yeet-src/usbsnoop
2•r3tr0•1h ago•0 comments

E-Scooter Rider and Cyclist Are Killed in Head-On Crash on NYC Bridge

https://www.nytimes.com/2026/05/28/nyregion/queensboro-bridge-nyc-bike-scooter-crash-deaths.html
2•ChrisArchitect•1h ago•0 comments

The One Terminal you will need

https://github.com/8868derek/oneterminal
2•DerekFan•1h ago•0 comments

Dating apps were never built to deliver you to anyone

https://pilgrimsage.substack.com/p/the-two-doors
1•momentmaker•1h ago•2 comments

Show HN: OWASP Agent Memory Guard – Stop AI Agent Memory Poisoning

https://github.com/OWASP/www-project-agent-memory-guard
2•vgudur297•1h ago•0 comments

Please Do Not Vibe Fuck Up This Software – Rsync

https://github.com/RsyncProject/rsync/issues/929
65•justdotJS•1h ago•23 comments

The Home-Insurance Coin Flip: Nearly Half of Claims Result in Zero Payout

https://www.wsj.com/finance/the-home-insurance-coin-flip-nearly-half-of-claims-result-in-zero-pay...
4•JumpCrisscross•1h ago•0 comments

Local-first, single-binary chaos engineering CLI for indie devs

https://github.com/1999labs/antics
2•knownquantity_•1h ago•0 comments

America Has a Pangram Problem

https://www.theatlantic.com/technology/2026/05/pangram-ai-detection-accuracy/687381/
2•paulpauper•1h ago•1 comments

The Feeling of Control Slipping Away

https://www.theatlantic.com/technology/2026/05/ai-agents-agency-crisis-humanity/687379/
3•paulpauper•1h ago•1 comments

80k Hours: The Book

https://marginalrevolution.com/marginalrevolution/2026/05/80000-hours-the-book.html
1•paulpauper•1h ago•0 comments

Chinese Actors' Impersonation and Stolen Narratives in Digital Repression

https://citizenlab.ca/research/how-chinese-actors-use-impersonation-and-stolen-narratives-to-perp...
2•WaitWaitWha•1h ago•0 comments

The radical network redesign that led AWS to forge a more resilient cloud

https://www.aboutamazon.com/stories/aws-random-graph-theory-data-center-network-design
3•tanelpoder•1h ago•0 comments

How to Build a Shitty Robot

https://mariozechner.at/posts/2026-05-30-shitty-robot/
1•zdw•1h ago•1 comments

What Distinguishes the Super Rich from the Rest of Us

https://knowledge.insead.edu/leadership-organisations/what-distinguishes-super-rich-rest-us
2•makerdiety•2h ago•3 comments