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: Prior art search engine that resolves patents to claim language ($30)

https://patent-gnome.com
1•ZgordanVV•49s ago•0 comments

HN AI Highlights – weekly digest of the best AI posts

https://hn-ai-newsletter.beehiiv.com/p/last-week-s-ai-highlights-from-hn-27
1•floydax•1m ago•0 comments

Ask HN: What's one thing you wish AI did well?

1•akashwadhwani35•1m ago•0 comments

Stop Waiting for Insights: Building Streaming Analytics with DolphinDB

https://medium.com/@DolphinDB_Inc/stop-waiting-for-insights-building-streaming-analytics-with-dol...
2•dbaa4real•4m ago•0 comments

Engineering a 24/7 Market Data Infrastructure for Crypto Trading

https://medium.com/@DolphinDB_Inc/engineering-always-on-market-data-infrastructure-for-crypto-tra...
2•Polly_Liu•5m ago•0 comments

Comparing Three Time-Series Databases on Billion-Row IoT Workloads

https://medium.com/@DolphinDB_Inc/benchmarking-time-series-databases-for-iot-at-scale-dolphindb-i...
2•CrazyTomato•5m ago•0 comments

Teardown Confirms the Trump Phone Is a Gold-Painted HTC U24 Pro

https://it.ifixit.com/News/117789/teardown-confirms-the-trump-phone-is-a-gold-painted-htc-u24-pro
1•serhack_•9m ago•0 comments

I used Fable to edit its own launch video

https://twitter.com/trq212/status/2064826394589442448
1•7777777phil•12m ago•0 comments

Closed-models are do not (financially) scale

https://blog.nilesh.io/post/ai-profit-race
1•MisterKent•12m ago•0 comments

We economists have done the maths: 'growth' is a doomed strategy

https://www.theguardian.com/commentisfree/2026/jun/10/economists-maths-growth-doomed-strategy-un-...
1•robtherobber•12m ago•0 comments

Mindustry

https://github.com/anuken/mindustry
1•tosh•13m ago•0 comments

Flywheel

https://en.wikipedia.org/wiki/Flywheel
1•tosh•13m ago•0 comments

A Mathematical Theory of Communication [pdf]

https://people.math.harvard.edu/~ctm/home/text/others/shannon/entropy/entropy.pdf
1•thunderbong•17m ago•0 comments

Show HN: Arcadia – visualize your time on a 24-hour clock

https://arcadia.vercel.app
1•Orbyss_Studio•19m ago•1 comments

LabEx Challenges: LeetCode for Linux

https://labex.io/challenges
1•huhuhang•20m ago•0 comments

Show HN: Seamless: content-addressed computation and caching

https://github.com/sjdv1982/seamless
1•sjdv1982•20m ago•0 comments

The Brazilian authorities have blocked api.github.com nationwide

https://twitter.com/ayubio/status/2064878070394183955
2•brunocroh•22m ago•0 comments

OVH Grp enters into exclusive negotiations to acquire Gladia, expert in voice AI

https://corporate.ovhcloud.com/en/newsroom/news/ovhgroupe-gladia-exclusive-negotiations-voice-ai/
1•qwertox•22m ago•0 comments

/e/OS 4.0 is here

https://murena.com/meet-e-os-4-0/
2•raffael_de•22m ago•0 comments

Five multi-model patterns that cut token costs

https://berget.ai/en/blog/five-patterns-for-multi-model-stack
1•marols•23m ago•1 comments

Show HN: Spoiler-Free Website for UFC, FIFA World Cup, Formula 1

https://eventclock.org
1•budgetjonsnow•25m ago•0 comments

Whales copy trading on Polygoose

https://polygoose.xyz/en/
1•manofix•27m ago•0 comments

Show HN: I ported 11 model families to Apple's new on-device AI framework

https://github.com/john-rocky/coreai-model-zoo
2•mlboy•27m ago•0 comments

Show HN: LinkedIn Unfiltered – Turn AI slop into readable posts

https://github.com/kjhq/linkedin-unfiltered
1•thunderdrag•28m ago•0 comments

Personal Guardian Angel with LLM

https://gwern.net/guardian-angel
1•rickybule•30m ago•0 comments

We Cut Onboarding Time by 40% Using AI – Here's What We Did (Week 5 Roun

https://theaileverageweekly.com/posts/we-cut-onboarding-time-by-40-using-ai-here-s-exactly-what-w...
1•talvardi7•40m ago•0 comments

Genblaze: Open-Source Python SDK for Multi-Provider Generative Media Pipelines

https://www.backblaze.com/blog/introducing-genblaze-a-python-sdk-for-generative-media-pipelines/
1•LaSombra•42m ago•0 comments

Misenlac.es – Your bio link and URL shortener in one place

https://misenlac.es/es
1•david_rodriguez•43m ago•1 comments

SpaceX IPO makes Elon Musk the first trillionaire

https://www.reuters.com/business/media-telecom/spacex-ipo-makes-elon-musk-worlds-first-trillionai...
1•thomascountz•48m ago•2 comments

An Overpass QL interpreter using the QLever database

https://www.openstreetmap.org/user/Kai%20Johnson/diary/408849
2•altilunium•51m ago•0 comments