frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

I made a research test suite for analysis of software metrics overtime

https://abigail.sh/writing/historical-analysis-of-software-metrics/
1•abigailphoebe•32s ago•1 comments

Why Are Palantir and OpenAI Scared of Alex Bores?

https://www.youtube.com/watch?v=znKb71kLG5c
1•frm88•42s ago•0 comments

Designing web interfaces with Claude Code

https://segbedji.com/designing-interfaces-with-claude-code/
1•segbedji•45s ago•0 comments

Better (Free) GitHub Readme Widgets

https://gh-stats.com
1•s_manor•1m ago•1 comments

The Luddites Were the First to Attack AI

https://marginalrevolution.com/marginalrevolution/2026/04/the-luddites-were-the-first-to-attack-a...
1•speckx•1m ago•0 comments

Is your site agent-ready?

https://blog.cloudflare.com/agent-readiness/
1•tgdn•1m ago•0 comments

CrabTrap: An LLM-as-a-judge HTTP proxy to secure agents in production

https://www.brex.com/crabtrap
1•pedrofranceschi•1m ago•0 comments

FlashKDA: High-performance Kimi Delta Attention kernels

https://github.com/MoonshotAI/FlashKDA
1•zaevlad•2m ago•0 comments

Firefox 150.0 Release Notes

https://www.firefox.com/en-US/firefox/150.0/releasenotes/
1•N19PEDL2•2m ago•0 comments

Age verification is officialy TRASH

https://www.google.com/url?sa=t&source=web&rct=j&url=https%3A%2F%2Fcybernews.com%2Fsecurity%2Feu-...
1•default__paul•2m ago•1 comments

The 'unregistered Americans': because of their parents, they do not exist

https://www.theguardian.com/us-news/ng-interactive/2026/apr/21/unregistered-americans-sovereign-c...
1•MaysonL•3m ago•0 comments

The layer that helps machines understand why, so they can act without being told

https://kenoticlabs.com/thesis
1•SamuelTanguturi•4m ago•0 comments

Capture and replay Postgres workload at scale

https://github.com/pg-retest/pg-retest
1•TheMadHatter76•4m ago•0 comments

The cost for posting links using X's API increased today by 1900%

https://twitter.com/mediagazer/status/2046268441028444223
2•ilamont•4m ago•0 comments

Termux vs. Terminal on Pixel 10

1•thekosmix•5m ago•0 comments

Exposing the flaw in tap to pay [video]

https://www.youtube.com/watch?v=PPJ6NJkmDAo
1•gmays•5m ago•0 comments

How is the world doing today?

https://daytone.app
1•skaplich•5m ago•0 comments

Emacs Is My Browser

https://joshblais.com/blog/emacs-as-my-browser/
1•signa11•5m ago•0 comments

Finishing Things

https://ratfactor.com/finishing-things
1•signa11•6m ago•0 comments

Why "mark your variables as sensitive" is the wrong lesson from the Vercel hack

https://robisit.com/thoughts/modern-platform-part-2/
2•RobIsIT•7m ago•0 comments

The AI engineering stack we built internally – on the platform we ship

https://blog.cloudflare.com/internal-ai-engineering-stack/
1•Brajeshwar•8m ago•0 comments

Alex Bores rolls out "AI dividend" plan to share AI wealth

https://www.axios.com/2026/04/20/alex-bores-ai-dividend-plan-wealth
1•signa11•8m ago•0 comments

Regula – scans your code for EU AI Act risk indicators (Python CLI, MIT)

https://github.com/kuzivaai/getregula
1•kuzivaai•9m ago•0 comments

Sweden Orders Talgo Nighttrains

https://back-on-track.eu/sweden-orders-talgo-nighttrains/
2•edward•12m ago•0 comments

You can make something good

https://sfalexandria.substack.com/p/you-can-make-something-good
1•nanfinitum•12m ago•0 comments

Thiel Foundation Announces 2026 Class of Thiel Fellows

https://www.businesswire.com/news/home/20260420984007/en/Thiel-Foundation-Announces-2026-Class-of...
1•ronfriedhaber•12m ago•0 comments

Chinese diamond-based coating boosts data center cooling efficiency by 80%

https://thecoolingreport.com/intel/diamond-copper-composite-coating-chinese-academy-sciences-cool...
1•jackdilusso•12m ago•0 comments

China blew up its own future [video]

https://www.youtube.com/watch?v=AultJcNb90c
1•ggraphilia•12m ago•0 comments

Azure SRE Agent flaw lets outsiders silently eavesdrop on cloud operations

https://www.csoonline.com/article/4161389/azure-sre-agent-flaw-let-outsiders-silently-eavesdrop-o...
2•talhof8•12m ago•0 comments

Did Taylor Swift kill a bunch of people?

https://statmodeling.stat.columbia.edu/2026/04/21/did-taylor-swift-kill-a-bunch-of-people/
1•u1hcw9nx•13m ago•1 comments