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 Metacircular Interpreter in Rhombus

https://github.com/racket/rhombus/blob/master/rhombus/rhombus/tests/example-interp.rhm
1•spdegabrielle•20s ago•1 comments

AI is potentially a Dunning-Kruger effect amplifier

https://twitter.com/i/status/2066825204207091926
1•binyu•1m ago•0 comments

We built an agent that runs our AI data platform

https://encord.com/blog/merlin-encord-mcp-agentic-intelligence/
2•ulrikhansen54•3m ago•0 comments

Databricks Launches LTAP: A Unified OLAP/OLTP Data Architecture

https://www.databricks.com/company/newsroom/press-releases/databricks-launches-ltap-first-lake-tr...
2•thehaikuza•3m ago•0 comments

Predicting model behavior before release by simulating deployment

https://openai.com/index/deployment-simulation/
1•0xedb•5m ago•0 comments

The feedback loops behind Kubernetes

https://planetscale.com/blog/the-feedback-loops-behind-kubernetes
2•CSDude•5m ago•0 comments

Hecate, Hardened Osint Platform

https://github.com/synchancybersecurity/Hecate
2•enkimecca•6m ago•0 comments

U.S. pulling ocean sensors a 'shock' for Canadian research as El Niño nears

https://www.timescolonist.com/local-news/us-pulling-ocean-sensors-a-shock-for-canadian-research-a...
5•ResearchAtPlay•6m ago•0 comments

PHP Through a Screen Reader: Small Syntax Choices That Matter

https://thephp.foundation/blog/2026/06/16/php-through-a-screen-reader-small-syntax-choices-that-m...
1•itafroma•7m ago•0 comments

Noctua introduces NL-LC1 all-in-one liquid coolers

https://www.noctua.at/en/news/noctua-introduces-nl-lc1-all-in-one-liquid-coolers
4•georgs_•7m ago•0 comments

Rabbit Hole: The Lorem Ipsum Mystery [video]

https://www.youtube.com/watch?v=kL1PDqzqhM4
1•luizfzs•8m ago•0 comments

Show HN: Next.js boilerplate with Better Auth, PostgreSQL and Shadcn/UI

https://github.com/mmilanovic4/forge
1•mmilanovic4•8m ago•0 comments

Tyler Cowen: A Dangerous Turn in AI Regulation

https://www.thefp.com/p/tyler-cowen-a-dangerous-turn-in-ai
1•paulpauper•8m ago•0 comments

How to Catch a Chess Cheater

https://www.uschess.org/index.php/June/How-To-Catch-A-Chess-Cheater-Ken-Regan-Finds-Moves-Out-Of-...
1•bookofjoe•8m ago•0 comments

Students Are Using a 'Backdoor' to Attend Their Dream Schools

https://www.wsj.com/us-news/education/college-admissions-alternative-enrollment-programs-communit...
1•paulpauper•9m ago•0 comments

Show HN: Ril: a parallel data streaming tool for Python

https://github.com/dannypesic/ril
1•dpesic•9m ago•0 comments

Can Online Activity Be Regulated? Evidence from Adult Websites

https://www.nber.org/papers/w35322
1•paulpauper•9m ago•0 comments

Nobody wants to tell me why they only listen to their own Suno slop

https://www.theverge.com/ai-artificial-intelligence/937059/nobody-wants-to-tell-me-why-they-only-...
1•thebigship•9m ago•0 comments

Claudity

https://danielmay.co.uk/posts/claudity/
1•speckx•10m ago•0 comments

Ask HN: Looking for mobile app ideas with real user demand

3•habeebmd•11m ago•0 comments

AI Consciousness:The Delusionals and the Philosopher's Bench

https://www.avidfayaz.com/writings/delusionals/the-delusionals-and-the-philosophers-bench
7•Avid_F•12m ago•0 comments

Show HN: Write Your GitHub Actions in TypeScript

https://github.com/dedalus-labs/hollywood
3•windsor•12m ago•2 comments

There's more than one way to be a 10x engineer

https://orischwartz.com/posts/theres-more-than-one-way-to-be-a-10x-engineer.html
1•fleaflicker•13m ago•0 comments

The Rivian R2's Radio Needs Cell Signal the Wilderness Doesn't Have

https://www.carscoops.com/2026/06/rivian-r2-fm-radio/
2•MBCook•13m ago•1 comments

Anyone give me a strong mobile app idea

2•habeebmd•14m ago•0 comments

Show HN: Dopamine – An MIT-Licensed Open-Source Cross-Platform Effects Library

https://github.com/10in30/dopamine/
1•jmckenty•14m ago•0 comments

Build your project Zig-style

https://fnordig.de/2026/06/16/build-your-project-zig-style/
1•caleb_thompson•15m ago•0 comments

When Intelligence Gets Cheap, What Becomes Valuable?

https://agonora.com/blog/when-intelligence-gets-cheap
5•mw67•15m ago•1 comments

Snap unveils $2,195 AR glasses as CEO Evan Spiegel bets on post-smartphone futur

https://www.cnbc.com/2026/06/16/snap-unveils-2195-specs-ar-glasses-spiegel-bets-on-post-smartphon...
1•mmarian•16m ago•0 comments

Unlocking Extreme AMD Instinct Inference with Software-Hardware Co-Optimization

https://rocm.blogs.amd.com/software-tools-optimization/atom-inference-engine/README.html
1•mooreds•19m ago•0 comments