frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Repatriation games: the mid-market reevaluates its public cloud consumption

https://www.techradar.com/pro/repatriation-games-the-mid-market-reevaluates-its-public-cloud-cons...
1•PaulKeeble•51s ago•0 comments

Works in Progress is now in print

https://worksinprogress.co/print/
1•bensouthwood•3m ago•0 comments

The Art of Japanese Stationery: Why It's More Than Just Office Supplies

https://shibuya-stationery.com/blogs/news/the-art-of-japanese-stationery-why-it-s-more-than-just-...
1•causalitycone•4m ago•0 comments

Slack Client for Your Terminal

https://github.com/jpbruinsslot/slack-term
1•gz09•5m ago•0 comments

Digging deeper into YouTube's view count discrepancy

https://www.jeffgeerling.com/blog/2025/digging-deeper-youtubes-view-count-discrepancy
1•Bogdanp•14m ago•0 comments

Kim Dotcom Extradition Decision Was Lawful, Judicial Review Denied

https://torrentfreak.com/kim-dotcom-extradition-decision-lawful-judicial-review-denied-250916/
3•gslin•16m ago•0 comments

Amiga Walker

https://en.wikipedia.org/wiki/Amiga_Walker
2•doener•16m ago•0 comments

40k-Year-Old Symbols in Caves Worldwide May Be the Earliest Written Language

https://www.openculture.com/2025/09/40000-year-old-symbols-found-in-caves-worldwide-may-be-the-ea...
3•mdp2021•19m ago•0 comments

Best Shippping Aggregrator in India

1•orderzup•19m ago•0 comments

Lovemoney Game Online why this game so popular?

https://lovemoneygames.com
1•Febe1212•20m ago•0 comments

Vivaldi 7.6 allows customizing the Tab Bar and adds a Tab Button

https://vivaldi.com/blog/vivaldi-on-desktop-7-6/
3•newscombinatorY•21m ago•1 comments

Carbon Copy No.8: Classes Part II

https://github.com/carbon-language/carbon-lang/discussions/6090
2•zmodem•23m ago•0 comments

AI has changed the career pathway for junior developers

https://stackoverflow.blog/2025/09/10/ai-vs-gen-z/
1•Tikrong•25m ago•0 comments

Electricity through osmosis: Japan opens landmark osmotic power plant

https://newatlas.com/energy/electricity-through-osmosis-japan-opens-worlds-second-osmotic/
3•Ozarkian•27m ago•0 comments

C++ Committee Prefers Bjarne's Profiles to Baxter's Rustification

1•robinsrowe•27m ago•0 comments

A tool help you find the hairstyle that suits you

https://righthair.ai/
1•MiaTaylor•29m ago•0 comments

"Why Everything Pam Bondi Said About 'Hate Speech' Is Wrong"

https://reason.com/volokh/2025/09/16/why-everything-pam-bondi-said-about-hate-speech-is-wrong/
2•mdp2021•30m ago•0 comments

Show HN: A recursive calendar for 0.1x engineers

1•eltonlin•31m ago•0 comments

Pnpm has a new setting to stave off supply chain attacks

https://pnpm.io/blog/releases/10.16
2•ivanb•34m ago•0 comments

Is there demand for a managed web automation and monitoring service?

1•TheOneEye•36m ago•0 comments

9 Years Solo: Building Complex AI Competition in a Game Management SIM

1•binogure•36m ago•0 comments

Redux in 2025: A reliable choice for complex React projects

https://stefvanwijchen.com/react-and-redux-in-2025/
1•nnx•37m ago•0 comments

Google DeepMind claims 'historic' AI breakthrough in problem solving

https://www.theguardian.com/technology/2025/sep/17/google-deepmind-claims-historic-ai-breakthroug...
2•fergie•39m ago•1 comments

Is viewpoint based flagging suppressing critical replies on this post?

https://news.ycombinator.com/item?id=45282482
1•shadowbanning•42m ago•3 comments

Dyson spheres are a joke [video]

https://www.youtube.com/watch?v=fLzEX1TPBFM
1•ilitirit•45m ago•0 comments

History of the Gem Desktop Environment

https://nemanjatrifunovic.substack.com/p/history-of-the-gem-desktop-environment
7•ibobev•51m ago•1 comments

CERN Animal Shelter for Computer Mice

https://computer-animal-shelter.web.cern.ch/index.shtml
3•EbNar•53m ago•2 comments

Virginia Class Submarines [video]

https://www.youtube.com/watch?v=6xyYzocJi1c
1•CHB0403085482•56m ago•0 comments

Gemini achieves gold-medal level at the Programming Contest World Finals

https://deepmind.google/discover/blog/gemini-achieves-gold-level-performance-at-the-international...
3•doener•59m ago•1 comments

Getting ArXiv Sanity Papers via RSS (2022)

https://den.dev/blog/arxiv-sanity-rss-feeds/
1•alastairr•1h ago•0 comments