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

A curated list of tools and resources for vibecoders

https://github.com/ai-for-developers/awesome-vibe-coding
1•dariubs•9m ago•0 comments

Show HN: LectureToBook – Turn Videos into a PDF/ePub

https://lecturetobook.com/
1•h02•15m ago•0 comments

The device detecting the deadliest creature

https://www.smh.com.au/national/nsw/the-device-detecting-the-world-s-deadliest-creature-20260715-...
1•femto•15m ago•0 comments

Inside the Secret Math Society Known Simply as Nicolas Bourbaki

https://www.quantamagazine.org/inside-the-secret-math-society-known-as-nicolas-bourbaki-20201109/
2•pykello•16m ago•0 comments

Scrying the AMD GFX1250 LLVM Tea Leaves

https://chipsandcheese.com/p/scrying-the-amd-gfx1250-llvm-tea
1•mfiguiere•19m ago•0 comments

Show HN: Zlvox – 25 Free Developer Tools (AI, JSON, PDF) with Zero Tracking

https://zlvox.com/
2•team_zlvox•24m ago•1 comments

Impro is a handbook for running a cult

https://www.seangoedecke.com/impro/
1•zuzuleinen•25m ago•0 comments

TCG Price and Portfolio Tracker

https://www.collectiblez.app/
1•GogetaUI•26m ago•0 comments

Data centers have united Americans of both parties in a shared hatred

https://www.washingtonpost.com/technology/2026/07/18/how-data-centers-became-symbol-americans-rage/
2•1vuio0pswjnm7•27m ago•1 comments

Pygmalion as a Software Developer

https://kyle.au/blog/pygmalion-as-a-software-developer
2•kylephillipsau•32m ago•0 comments

AXI – Agent EXperience Interface

https://axi.md/
1•jeffscottward•36m ago•1 comments

Private jets flock to Montana – but locals can't afford the trailer park

https://www.bbc.com/news/articles/ckg92d8d40yo
1•tartoran•46m ago•0 comments

Two unexpected revelations in Warren Buffett's CNBC interview

https://www.cnbc.com/2026/07/18/two-unexpected-revelations-in-warren-buffetts-cnbc-interview.html
1•pm2222•47m ago•0 comments

Archive.org Is Offline

https://archive.org
3•robotbikes•48m ago•2 comments

Google's Gemini delay: Coding stumbles, clashing teams and frustrated engineers

https://www.latimes.com/business/story/2026-07-17/inside-googles-gemini-delay-coding-stumbles-cla...
2•1vuio0pswjnm7•51m ago•1 comments

Agentty ADE: reliable L2 multi-agent orchestrator

https://github.com/agentty-xyz/agentty
5•minev-dev•55m ago•5 comments

XEphem – Astronomy Visualizer for X

https://xephem.github.io/XEphem/Site/
1•oliverkwebb•56m ago•0 comments

Anthropic extends Claude Code's 50% weekly limit increase through August 19

https://twitter.com/ClaudeDevs/status/2078511173759324328
3•mil22•1h ago•0 comments

How much horsepower does a horse have?

https://www.iflscience.com/how-much-horsepower-does-a-horse-have-66499
1•teleforce•1h ago•1 comments

Netflix Pays $587M for Ben Affleck's AI Startup InterPositive

https://variety.com/2026/film/news/netflix-paid-587-million-ben-affleck-ai-interpositive-1236815111/
3•OccamsMirror•1h ago•1 comments

Collecting material feels more useful than it usually is

https://notes.andymatuschak.org/zQm6XAB3XXrXLHzF7gahpJ2
2•o4c•1h ago•3 comments

Show HN - Online developer profiles with embedded AI hypeman

https://engineerprofiles.com
1•skellertor•1h ago•0 comments

Show HN: Wave – Talk to AI. Meet the human on the other side

https://www.getonwave.com/
1•nabil_idrissi•1h ago•0 comments

Things that made me come back to Emacs

https://cephei8.dev/blog/emacs-things/
2•signa11•1h ago•0 comments

I turned Slack into a live console for my production dotnet app

https://mykeels.com/blog/i-turned-slack-into-a-live-console-for-my-production-dotnet-app/
1•mykeels•1h ago•0 comments

Heap. – native desktop Kanban, calendar, and docs for engineers

https://github.com/sectapunterx/heap
1•eloisius•1h ago•0 comments

Five Unix ideas from the 1970s are why Linux still works so well

https://www.howtogeek.com/stop-reinventing-the-wheel-these-unix-ideas-from-the-seventies-are-why-...
2•teleforce•1h ago•0 comments

RL economics, morally charged terms, and "distillation"

https://thomasdullien.github.io/posts/2026-06-15-rl-economics-morally-charged-terms-and-distillat...
1•samuel246•1h ago•0 comments

How to prevent white clothes from turning yellow in storage

https://www.southernliving.com/how-to-pevent-white-clothes-from-turning-yellow-in-storage-12016122
2•teleforce•1h ago•0 comments

Tokensave: An MCP Server That Saved Me Tokens While Coding

https://www.tobiasreithmeier.de/en/blog/tokensave-mcp-server-tutorial-review
2•freediver•1h ago•0 comments