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

Show HN: How to Use Unlimited Token Plan with OpenCode

https://twitter.com/CanopyWave_AI/status/2069957571184832525
1•Timmyzzz•1m ago•0 comments

Anthropic Claims Alibaba Ran 'Brazen' Campaign to Access Its Claude AI Model

https://www.wsj.com/tech/ai/anthropic-claims-alibaba-ran-brazen-campaign-to-access-its-claude-ai-...
1•flowerlad•3m ago•0 comments

ORA: Smaller Models. Same Intelligence

https://www.oracomputing.com/
1•doener•5m ago•0 comments

The Era of Tokenmaxxing Is Over

https://techcrunch.com/2026/06/24/companies-are-scrambling-to-stop-employees-from-maxing-out-ai-b...
1•sambcui•5m ago•0 comments

Show HN: Tree, truth, druid and tar share one Proto-Indo-European root

https://p.migdal.pl/tree-of-tree/
1•stared•5m ago•0 comments

Vibecoding a High Performance System

https://andrewkchan.dev/posts/systems.html
2•davedx•12m ago•0 comments

NextBSD – FreeBSD ABI-compatible kernel with Mach built in and launchd

https://nextbsd.org/
2•sunshine-o•15m ago•0 comments

Hollywood and Big Tech Are Preparing for War

https://www.hollywoodreporter.com/business/business-news/hollywood-big-tech-war-entertainment-pla...
1•thm•16m ago•0 comments

Show HN: Cc-preview – Browse images pasted into Claude Code sessions

https://github.com/Watari995/cc-preview
1•Watari995•16m ago•0 comments

Flatpak package for GIMP 0.54.1 (1996)

https://gitlab.gnome.org/balooii/gimp-0.54
1•birdculture•20m ago•0 comments

13 years and $500M for a stage adapter? Report justifies NASA cancellations

https://arstechnica.com/space/2026/06/analysis-finds-the-exploration-programs-nasa-recently-cance...
1•rbanffy•20m ago•0 comments

Show HN: JSON Bonsai – browser JSON viewer that stays smooth on 100k+ nodes

https://github.com/pedrosousa13/JSON-Bonsai
1•pedrosousa•21m ago•0 comments

How to Build 1-Minute OHLC Bars from Non-Uniform Market Snapshot Data

https://medium.com/@DolphinDB_Inc/how-to-build-1-minute-ohlc-bars-from-non-uniform-market-snapsho...
2•dbaa4real•22m ago•0 comments

Show HN: Best Alternative for Zendesk, Intercom, and Freshdesk

2•Daniel-Pan•23m ago•0 comments

Monolith Rift, a brutalist corridor of light and impossible scale

https://sand-morph.up.railway.app/monolith-rift
4•echohive42•25m ago•1 comments

UMLBot: Converting natural language and code excerpts to editable UML diagrams

https://www.sciencedirect.com/science/article/pii/S2352711026002815
1•geox•26m ago•0 comments

Rcarmo/kata: Repetition makes perfect

https://github.com/rcarmo/kata
1•rcarmo•33m ago•0 comments

Claude Opus 4.5 vs. GLM-5.2

https://gopeekapp.blogspot.com/2026/06/glm-52-vs-claude-opus-45.html
1•bhartipoddar•34m ago•0 comments

US fighter pilot avoids British trial after raping a woman in England

https://www.theguardian.com/uk-news/ng-interactive/2026/jun/25/us-fighter-pilot-strangled-woman-e...
4•Alien1Being•37m ago•1 comments

Qualcomm Investor Day 2026 Data Center Announcements CPUs

https://www.servethehome.com/qualcomm-investor-day-2026-data-center-announcements-cpus-ai-acceler...
1•ksec•40m ago•1 comments

A Y2K bug surfaced 26 years late today

https://old.reddit.com/r/sysadmin/comments/1uetdyw/a_y2k_bug_surfaced_26_years_late_today/
1•thunderbong•40m ago•0 comments

Calculate Real-Time Implied Volatility for Commodity Options

https://medium.com/@DolphinDB_Inc/how-we-built-a-real-time-implied-volatility-engine-for-commodit...
2•Polly_Liu•42m ago•0 comments

Warrior Cats Name Generator

https://warriorcatsnamegenerator.net/
1•woflying•43m ago•0 comments

We Made Trading Signals Microsecond-Level Easy – 100 Factors in 40µs

https://medium.com/@DolphinDB_Inc/we-just-made-trading-signals-microsecond-level-easy-100-factors...
2•CrazyTomato•43m ago•0 comments

You are leaving tech, what's next?

https://www.seattletimes.com/business/local-business/older-tech-workers-are-tapping-out-early-her...
1•ynac•43m ago•1 comments

Long distance Uber alternative (for passengers and drivers)

https://localsride.com/en
1•dr_dimitru•43m ago•0 comments

Will AI replace technical writers?

https://willaireplacetechnicalwriters.com/
1•theletterf•44m ago•0 comments

Got access to Gemini's actual thinking

1•StizzurpXDD•44m ago•0 comments

The AI Coding Era Makes Boring Tests More Valuable

https://www.vincentschmalbach.com/the-ai-coding-era-makes-boring-tests-more-valuable/
1•vincent_s•45m ago•0 comments

10x More Selective

https://yosefk.com/blog/10x-more-selective.html
1•tosh•46m ago•0 comments