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

Read Build Ship #1 – Starting at $0, 0 users, 27 followers. Here's the plan

https://readbuildship.substack.com/p/read-build-ship-1-starting-at-0-0
1•babilonczyk•7m ago•0 comments

What is the Fourth Dimension? (1884)

https://en.wikisource.org/wiki/What_is_the_Fourth_Dimension%3F
1•downbad_•14m ago•0 comments

Achieving Operational Excellence with AI

https://www.technologyreview.com/2026/07/02/1140045/achieving-operational-excellence-with-ai/
1•joozio•16m ago•0 comments

The Expensive Fictions of Low-Level Programming Languages

https://stng.substack.com/p/the-expensive-fictions-of-low-level
1•rbanffy•18m ago•0 comments

The Day I Played Hide-and-Seek with an AI

https://medium.com/@gianlucabailo/the-day-i-played-hide-and-seek-with-an-ai-7a1ee189b5ff
1•dexmac221•19m ago•1 comments

Running 26B and 35B LLMs at Full Speed on €990 of Used Hardware – No Cloud

https://medium.com/ai-advances/running-26b-and-35b-llms-at-full-speed-on-990-of-used-hardware-no-...
2•dexmac221•20m ago•0 comments

Why Europe doesn't have a Tesla

https://worksinprogress.co/issue/why-europe-doesnt-have-a-tesla/
1•nielsole•21m ago•1 comments

Scaling PgBouncer Beyond a Single CPU Core

https://clickhouse.com/blog/pgbouncer-clickhouse-managed-postgres
1•saisrirampur•22m ago•0 comments

The Data Recipe for Teaching AI New Skills [video]

https://www.youtube.com/watch?v=I9F_VFfLTmM
2•aborovykh•29m ago•1 comments

Obsidian AI Setup – A production-ready onboarding skill for AI agents

https://github.com/anliberant/obsidian-ai-setup
1•javatuts•32m ago•0 comments

Google's AI buildout drove 37% increase in electricity use in 2025

https://arstechnica.com/ai/2026/07/googles-ai-buildout-drove-37-increase-in-electricity-use-in-2025/
4•mpfect•43m ago•0 comments

Show HN: Opplic AI growth employees for web agencies

https://opplic.com
1•sanketta•45m ago•0 comments

Nvidia B300 vs H200: GPU Specs and Performance Analysis

https://canopywave.com/blog/nvidia-b300-vs-h200-gpu-specs-performance-analysis
1•Timmyzzz•51m ago•0 comments

Show HN: Warmbly – Automate cold email outreach

https://github.com/warmbly/warmbly
1•meszmate•52m ago•0 comments

Meta: New Muse Spark update, and an Opus level Muse variant, are both on the way

https://twitter.com/i/status/2072858780816330833
1•euio757•54m ago•0 comments

Go (golang) Report Card project/service was archived on Jul 1, 2026

https://github.com/gojp/goreportcard/commit/176744ca23b40aa64c55b390161a3c78982e91b8
1•guessmyname•57m ago•0 comments

Ask HN: Is anyone experimenting with different ways of using LLMs for coding?

11•yehiaabdelm•59m ago•13 comments

After WhatsApp, Indian govt sends notices to Telegram, Signal over usernames

https://www.hindustantimes.com/india-news/after-whatsapp-centre-notices-to-telegram-signal-today-...
1•shibaprasadb•1h ago•0 comments

Buy nothing, feel richer – South Korea dopamine apps

https://www.koreajoongangdaily.com/lifestyle/these-brainhacking-services-let-you-buy-absolutely-n...
1•BaudouinVH•1h ago•0 comments

Ford rehires human engineers after AI fails to match quality checks

https://www.bbc.com/news/articles/cgrkd41n2v9o
2•gmargari•1h ago•0 comments

Horsewood: I Tried It for 60 Days – My Honest ReviewS

https://finance.yahoo.com/sectors/healthcare/articles/horsewood-urgent-report-2026-horse-19110038...
1•gaxyjami•1h ago•0 comments

Ask HN: What does a good day at work look like in the AI era?

2•akashwadhwani35•1h ago•1 comments

We Tested 40 CSS Tools for Performance and Learning Curve. Here's What Won

https://cssawwwards.com/blog/color-blindness-accessible-design-guide-2026
2•cssawwwards•1h ago•0 comments

Three Hundred Fifty-Four Fireworks per Second. Is it a good idea?

https://chadtopaz.com/essays/fireworks-per-second.html
1•mattoxic•1h ago•0 comments

Why Build vs. Buy is the wrong question

https://quii.dev/Why_%22Build_vs_Buy%22_is_the_Wrong_Question
1•quii•1h ago•0 comments

Understanding AI with Soumitra Dutta

https://soumitradutta.gt.tc
1•davidwilliam26•1h ago•0 comments

AI is punishing game developers [video]

https://www.youtube.com/watch?v=59XdUJRzRxc
1•frag•1h ago•0 comments

Show HN: Mobile View – a Chrome extension showing desktop and mobile at once

https://chromewebstore.google.com/detail/mobile-view-—-mobile-simu/hocbjiaeeijekejepphjihbpogik...
2•mongrus•1h ago•2 comments

Agentrc – Dockerfile-shaped, governed packaging for AI agents

https://agentrc.ai/
1•adeelahmadch•1h ago•0 comments

First Principles of Model Routing

https://try.works/first-principles-of-model-routing
3•try-working•1h ago•0 comments