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

Federal loan support cut for degree programs that lead to low wages

https://www.latimes.com/california/story/2026-07-22/low-paying-degrees-federal-student-loan-cutof...
1•anigbrowl•3m ago•0 comments

S-OS V-RAM Engine – 8MB virtual memory on a $1.50 ESP32 without PSRAM

https://github.com/StepanoskiZ/vram-engine-esp32
1•ZStepanoski•4m ago•0 comments

Show HN: Yanes, yet another NES audio plugin:LinuxCLAP polyphonic chiptune synth

https://github.com/andrewfader/yanes
1•androsynth89•4m ago•0 comments

Dev proves LLMs will run on anything, even a $10 microcontroller

https://www.theregister.com/edge-and-iot/2026/08/04/dev-proves-llms-will-run-on-anything-even-a-1...
2•Bender•4m ago•0 comments

China turns up the heat with open model blitz as US model makers panic

https://www.theregister.com/ai-and-ml/2026/08/03/china-turns-up-the-heat-with-open-model-blitz-as...
2•Bender•5m ago•0 comments

Show HN: Movie scores from what people say when nobody's asking

https://skipthecritics.com
1•LevelTenMedia•5m ago•0 comments

Trump forced to reinstate broadband grants, court lets US scrap race criteria

https://arstechnica.com/tech-policy/2026/08/trump-forced-to-reinstate-broadband-grants-but-court-...
2•Bender•5m ago•0 comments

EA Is Now a Private Company

https://www.theverge.com/games/974736/ea-private-company-deal-closed
2•choult•6m ago•0 comments

AI Pets Are Here [video]

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

Speed Above All Else

https://twitter.com/Alfred_Lin/status/2084636778791858256
1•tosh•9m ago•0 comments

Yet Another OpenCode Plugin

https://npmjs.com/package/yet-another-opencode-plugin
1•smokeeaasd•10m ago•0 comments

Fiddler Classic Changes License: Noncommercial Use Only, 45 Days to Comply

https://www.telerik.com/purchase/license-agreement/fiddler
1•tech234a•10m ago•0 comments

Cloudflare Wallets: the programmable wallet for the agentic Internet

https://blog.cloudflare.com/wallets/
2•hahahaa•11m ago•0 comments

3D Printing Agentic Automation

https://praveenvijayan.substack.com/p/3d-print-automation-text-a-link-get
2•praveenvijayan•13m ago•1 comments

Ask HN: Dear Anthropic, can we please have thought traces back?

1•exabrial•14m ago•0 comments

Where the Automation Has to Stop

https://yusufaytas.com/where-the-automation-has-to-stop
7•montrealish•14m ago•0 comments

The 'dean of valuation' says pain is headed for more AI companies soon

https://www.businessinsider.com/ai-stock-market-correction-dean-of-valuation-aswath-damodaran-2026-8
2•mapping365•15m ago•0 comments

Personal computer is not that personal

https://prahaladhchandrahasan.github.io/thoughts/your-personal-computer-is-not-that-personal/
1•pdawg0518•16m ago•0 comments

Uber's Autonomous Vehicle Strategy: Slow Their Adoption

https://www.wired.com/story/ubers-autonomous-vehicle-strategy-slow-their-adoption/
1•dmitriy_ko•18m ago•0 comments

Should designers publicly share killed or speculative work?

https://benbarry.com/writing/should-designers-publicly-share-killed-or-speculative-work
1•herbertl•19m ago•0 comments

S

3•Sidhant_ch•20m ago•1 comments

Show HN: A search engine for VPS servers with an automatic crawler pipeline

https://vpspricetracker.com
1•davidebaldini•22m ago•0 comments

Codes, Chess and Kubrick: The Life of Jack Good – GCHQ

https://www.gchq.gov.uk/information/codes-chess-and-kubrick-life-jack-good
1•rbanffy•22m ago•0 comments

Data centers have a politics problem

https://www.politico.com/news/2026/08/01/data-centers-have-a-politics-problem-and-industry-knows-...
1•mapping365•23m ago•0 comments

Success of New Federal Housing Law Rests on States and Localities

https://ifp.org/the-success-of-the-new-federal-housing-law-now-rests-on-states-and-localities/
3•atlasunshrugged•23m ago•0 comments

Count Binface: Britain's 'joke' election candidates should be taken seriously

https://theconversation.com/count-binface-why-britains-joke-election-candidates-deserve-to-be-tak...
4•samizdis•23m ago•0 comments

Resistance grows nationwide against AI data center boom

https://www.cbsnews.com/video/resistance-grows-nationwide-against-ai-data-center-boom/
4•mapping365•23m ago•0 comments

An AI voice agent running locally on a $50 Arduino uno Q

https://projecthub.arduino.cc/neelbuilds/build-a-voice-based-kiosk-for-retail-store-using-moorche...
4•supportm•24m ago•0 comments

Could You Still Be "You" Without a Single Memory?

https://comuniq.xyz/post?t=1501
2•01-_-•24m ago•0 comments

Show HN: Mcpscore – validate any MCP server compliance with a new MCP version

https://github.com/mcp-box/mcpscore
1•alex_akimov•24m ago•0 comments