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

TensorSharp: Open-Source Local LLM Inference Engine

https://github.com/zhongkaifu/TensorSharp
1•zhongkaifu•5m ago•1 comments

The ways we contain Claude across products

https://www.anthropic.com/engineering/how-we-contain-claude
2•jbredeche•6m ago•0 comments

US House votes for measure that would end Iran war, in blow to Trump

https://www.reuters.com/world/us/us-house-backs-resolution-curbing-trump-iran-war-powers-2026-06-03/
1•Cider9986•8m ago•0 comments

Microsoft releases search engine for use by ML agents

https://searchengineland.com/microsoft-releases-web-iq-powered-by-bing-but-designed-for-how-ai-ag...
1•marojejian•9m ago•1 comments

The Social Science Research Network Has Jumped the Shark

https://www.stephenbainbridge.com/p/the-social-science-research-network
1•droidjj•9m ago•0 comments

fizzy: desktop app built in zig (DVUI)

https://fizzyed.it/
2•atmikemikeb•9m ago•0 comments

Show HN: Bio Glyph – Turn Your Face into a One-Line Drawing

https://bio.bairui.dev/
2•subairui•15m ago•1 comments

Failing grades soar with AI usage, dwindling math skills in Berkeley CS classes

https://www.dailycal.org/news/campus/academics/failing-grades-soar-as-professors-see-greater-ai-u...
1•littlexsparkee•16m ago•0 comments

Your phone can use tiny skin-color changes to measure your heart rate

https://www.nature.com/articles/s41586-026-10507-6
1•marojejian•19m ago•1 comments

DNS Is for People – Not for IT Infrastructure

https://louwrentius.com/dns-is-for-people-not-for-it-infrastructure.html
3•louwrentius•21m ago•0 comments

Apple Bringing App Store Age Verification to Texas as SB 2420 Takes Effect

https://www.macrumors.com/2026/06/03/apple-app-store-texas-sb-2420/
2•dabinat•24m ago•0 comments

Reading MAI's efficiency gain. How to pick architectures like serious people

https://idlemachines.co.uk/essays/efficiency-gain
1•smaddrellmander•29m ago•0 comments

Broadcom Slides After AI Chip Outlook Disappoints Investors

https://www.bloomberg.com/news/articles/2026-06-03/broadcom-outlook-disappoints-investors-seeking...
1•lesbarclays•32m ago•0 comments

The Ü Programming Language

https://github.com/Panzerschrek/U-00DC-Sprache/
12•deterministic•34m ago•4 comments

Last.fm's robots.txt include's Asimov's three laws of robotics as URIs

https://www.last.fm/robots.txt
3•cdrnsf•35m ago•0 comments

NBA probe of Steve Ballmer at forefront after Aspiration fraud sentencing

https://www.latimes.com/sports/story/2026-06-02/nba-investigation-steve-ballmer-clippers-kawhi-le...
3•1vuio0pswjnm7•35m ago•0 comments

Liable Humans for AI Deployments

https://liablehuman.com/
1•jbboehr•36m ago•0 comments

OpenAI Agent Builder Is Being Deprecated

https://developers.openai.com/api/docs/deprecations
1•ILOVEZOA•37m ago•0 comments

Inside The British Lab Hunting for Dangers Lurking in A.I

https://www.nytimes.com/2026/05/24/technology/uk-ai-safety-institute.html
1•bookofjoe•37m ago•1 comments

Bitcoin's high-conviction holders turning into sellers as price hits new lows

https://www.cnbc.com/2026/06/03/bitcoins-high-conviction-holders-are-selling-as-price-hits-new-lo...
2•1vuio0pswjnm7•38m ago•0 comments

Polymarket cuts ties with Santos as regulators probe trades on Kalshi

https://apnews.com/article/george-santos-polymarket-kalshi-prediction-market-dcc34f4d927d074fe4e1...
1•1vuio0pswjnm7•39m ago•0 comments

Good Teachers Don't Cheat

https://jasonkena.github.io/blog/posts/good_teachers_dont_cheat/
1•RevoGen•40m ago•0 comments

Can I get feedback on my llms.txt file?

https://fyikamran.com/llms.txt
1•kamran210•42m ago•3 comments

A New California Proposal Could Effectively Ban All Aftermarket Tires

https://www.caranddriver.com/news/a71475295/california-could-ban-aftermarket-tires/
1•SilverElfin•42m ago•0 comments

Europe Enters the 'Era of Deportations

https://english.elpais.com/international/2026-06-03/europe-enters-the-era-of-deportations.html
1•rawgabbit•42m ago•0 comments

We have now entered the age of Life-as-a-Service

https://bwanaerp.medium.com/how-did-everything-become-a-subscription-3101951d4769
1•instarlaxy•44m ago•0 comments

1971

https://wtfhappenedin1971.com/
1•matteohorvath•48m ago•1 comments

A minimal linear algebra library in pure Go

https://github.com/igomez10/linearalgebra
1•igomeza•52m ago•0 comments

AI Dark Output: The Visible Cost of Invisible Output

https://newsletter.semianalysis.com/p/ai-dark-output-the-visible-cost-of
1•arthurjj•56m ago•0 comments

Llms.txt is not a docs url dump

https://docsalot.dev/blog/llms-txt-for-saas-docs-what-to-include-and-what-to-skip
2•fazkan•56m ago•3 comments