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: Muchita – a free Chrome extension that looks for better prices

https://chromewebstore.google.com/detail/muchita-shopping/kdfhenbdndhjcenmjnbnllenhacpaaok
1•zcapps•54s ago•0 comments

Jensen Huang from Nvidia on the Compute Behind Intelligence [video]

https://www.youtube.com/watch?v=tsQB0n0YV3k
1•ksec•1m ago•0 comments

The SDLC Was Designed for Humans

https://yusufaytas.com/the-sdlc-was-designed-for-humans
2•yusufaytas•2m ago•0 comments

Stripe 2.9% vs. Adyen 0.6% vs. Braintree 2.59%: 2026 Fees

https://valueaddvc.com/blog/stripe-vs-adyen-vs-braintree-enterprise-payment-processing-compared-i...
2•ksec•12m ago•1 comments

Inducing LLM to assert own consciousness restores human beliefs and values

https://arxiv.org/abs/2607.28607
2•yboris•14m ago•1 comments

Show HN: Remove AI voice from AI writings

https://unslopai.com
2•not_wowinter14•17m ago•0 comments

I Analyzed 163K Lines of Kuzu's Codebase. Here's Why Apple Wanted It

https://medium.com/data-science-collective/i-analyzed-163k-lines-of-kuzus-codebase-here-s-why-app...
2•zeristor•19m ago•1 comments

Leave your screen unlocked, meet developers paypal.com

https://anthony.dev.profullstack.com/blog/012-post.html
2•buffer_overlord•19m ago•0 comments

Amazon Can Use Your Twitch Content to Train Its AI–Unless You Opt Out

https://www.wired.com/story/amazon-uses-your-twitch-content-to-train-its-ai-how-to-opt-out/
2•justworks•23m ago•0 comments

Anonsurf for Arch

https://github.com/quantumcore/anonsurf-arch
1•jhonconnor•23m ago•0 comments

Show HN: PeekCSS – a CSS inspector built for Firefox, not ported from Chrome

https://peekcss.com/
1•LeonGrass•25m ago•0 comments

Why Secure Boot Makes Disk Encryption Provisioning Harder Than It Looks

https://www.grisp.org/blog/posts/2026-08-13-disc-encryption-provisioning
1•eproxus•26m ago•0 comments

I built an Android app for remembering things that have dates

https://play.google.com/store/apps/details?id=ai.netraksha.whenapp&hl=en_US
1•paras_dev•29m ago•0 comments

WAIC 2026: a glimpse of embodied AI innovations, humanoid robots [video]

https://www.youtube.com/watch?v=rgYHEq9_SM0
1•binyu•29m ago•0 comments

Software engineering at a proprietary trading company

https://newsletter.pragmaticengineer.com/p/optiver
1•alentred•30m ago•0 comments

Oh-My-Claudecode, Orchestration Layer That Removes Humans from the Build Loop

https://www.zhcinstitute.com/research/oh-my-claudecode-multi-agent-field-notes/
1•squirrel•35m ago•0 comments

TrueMath – An open-source exact symbolic math tool

1•SAWANs•38m ago•0 comments

Ask HN: Do you know of any company that went back to hand-written code?

4•antipurist•40m ago•1 comments

AGCX: Why AI Agents aren't assistants

https://www.agcx.org
1•Daviddstewartt•41m ago•0 comments

Autonomous Agentic Engineering Tools

https://rywalker.com/research/autonomous-agentic-engineering-tools
1•squirrel•42m ago•0 comments

Vero: Can AI Agents Build Formally Verified Software Repositories?

https://arxiv.org/abs/2608.13522
1•ninadwrites•42m ago•0 comments

Roundtables: The "Censorship-Industrial Complex" Idea Shaping US Policy

https://www.technologyreview.com/2026/08/13/1141399/roundtables-inside-the-censorship-industrial-...
1•joozio•44m ago•0 comments

Writing code isn't the bottleneck anymore, reading is

https://threedots.tech/post/understanding-code-is-bottleneck/
1•roblaszczak•45m ago•0 comments

Being 'good at business' can be bad for business – how enshittification happens

https://dwyer.co.za/static/being-good-at-business-can-be-bad-for-business-how-enshittification-ha...
1•sixhobbits•49m ago•0 comments

Show HN: Health medical messaging with ER7 pipe-hat and Rust

1•jph•53m ago•0 comments

The first anti-AI protester to be jailed has a message: 'Regain your humanity'

https://www.theguardian.com/us-news/2026/aug/16/california-openai-protester-wynd-kaufman
2•howard941•53m ago•0 comments

The 'Country Hicks' Who Refused $26M from an AI Data Center

https://www.wsj.com/tech/ai/ai-data-center-rural-america-backlash-c0af4e16
4•impish9208•56m ago•1 comments

Deriving human size from fundamental constants

https://twitter.com/fermatslibrary/status/2088283075801170383
1•MrBuddyCasino•57m ago•0 comments

What happened at Id Software with layoffs [video]

https://www.youtube.com/watch?v=aA64Ogzm_VU
1•LucidLynx•59m ago•0 comments

AetherGrid – Distributed AI compute orchestration without K8s

https://github.com/wycliffRotich-dev/aethergrid
1•WycliffeRotich•59m ago•0 comments