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

Built on iPhone

https://twitter.com/vibecodeapp/status/2104663645712261448
1•euazOn•57s ago•0 comments

IFPI Wants Open Source YouTube Downloader yt-dlp on EU Piracy Watch List

https://torrentfreak.com/ifpi-wants-open-source-youtube-downloader-yt-dlp-on-eu-piracy-watch-list/
1•iamnothere•5m ago•0 comments

Back in 1990, when technology was still fun

https://myroom.isfine.org/
1•gmerc•6m ago•1 comments

Reducing undefined behavior in the C language

https://lwn.net/SubscriberLink/1095811/efcdbcf080cfa4c6/
1•stwrt•8m ago•0 comments

What if an MMO played like an API?

https://cooldownmmo.com/
1•lorderetik•9m ago•0 comments

Scripta Secure – inspect and sanitize PDF metadata locally

https://v5uiqvmda2.hdply.com
1•shallawma•11m ago•0 comments

Mastery Is a Wicked Problem

https://christiantietze.de/posts/2026/09/mastery-wicked-problem/
1•frizlab•11m ago•0 comments

Use my app and texts to relate various subject of math, higher and lover ranks

https://fzp9h5ycrt34.devv.app/
2•tvali•13m ago•1 comments

Dark Lyrics is the largest metal lyrics archive on the Web

http://www.darklyrics.com
1•dalmo3•14m ago•0 comments

AI companies leak data to advertisers [pdf]

https://jorgegarciaherrero.com/wp-content/interactivos/20260916-Prompt-like-a-butterfly-sting-lik...
4•damaru2•16m ago•0 comments

Performance Improvements in JDK 27

https://inside.java/2026/09/28/performance-update-jdk27/
2•pjmlp•16m ago•0 comments

Show HN: Faqs.me – Let your AI agent build the FAQ properly

https://faqs.me
1•ivanpenchev•20m ago•0 comments

SIMDjson 5.0 Released: Still Making JSON Parsing Even Faster

https://www.phoronix.com/news/SIMDjson-5.0
1•rbanffy•20m ago•0 comments

Switching to Emacs as a Neovim User

https://eliasebner.com/blog/thoughts/switching-to-emacs-as-a-neovim-user/
1•dimonomid•22m ago•0 comments

My experience writing automated tests for a SPA

https://reecoute.fr/tech_blog/2026-09-28_my-experience-writing-automated-tests-for-a-spa
1•dimonomid•25m ago•0 comments

Thank You, Uptodown DiskRaptor Now Available for Mac and Windows

https://diskraptor.com/en/
1•hansjoerghofer•25m ago•0 comments

Neuroevolution: Harnessing Creativity in AI Agent Design

https://neuroevolutionbook.com/
1•pmanot•26m ago•0 comments

Exploring AI Agent Governance: Privilege Escalation and Security Boundaries

https://medium.com/@ddggxxlljj/my-fries-were-sanctioned-by-a-rogue-delivery-ai-on-public-facing-a...
1•dgxlj•27m ago•0 comments

Nvidia Vera SMT Performance Benchmarks Review

https://www.phoronix.com/review/nvidia-vera-smt
1•rbanffy•27m ago•0 comments

Free proxies that work: 700 sources

https://github.com/maximilianfeix/proxy-scraper
1•taventix•28m ago•0 comments

Ask W3C Internationalization

https://labs.w3.org/ask-i18n/
1•xfq•29m ago•0 comments

Boeing "incredibly excited" to serve as nation's only astronaut transportation

https://arstechnica.com/space/2026/09/boeing-incredibly-excited-to-serve-as-nations-only-astronau...
1•rbanffy•29m ago•0 comments

Where Nothing Is Broken, and No One Is Okay

https://medium.com/@gurvinder372/article-24-where-nothing-is-broken-and-no-one-is-okay-50f2e5f8c67a
1•gps372•29m ago•0 comments

Tech employment in Silicon Valley is falling since 2022 peak

https://twitter.com/KobeissiLetter/status/2104682816365539754
2•mw67•29m ago•0 comments

Show HN: A goal tracker that looks like a 1983 terminal, drawn in Swift

https://apps.apple.com/us/app/thrive-habit-goal-tracker/id6768297854
2•NSergeevich•34m ago•0 comments

OpenAI Reopens $200 Pro Tier with %50 Usage Adjustment

https://x.com/i/trending/2104844080178217375
1•soltanov•34m ago•2 comments

My City Just Banned Flock After My Wrongful Stop Made National News

https://www.thedrive.com/news/my-city-just-banned-flock-after-i-was-wrongfully-stopped
3•Markoff•35m ago•1 comments

Espanso GUI – A graphical interface for Espanso text expander

https://github.com/johannjdk/espanso-gui
1•johannjdk•35m ago•0 comments

Evan Doorbell's Phone Tapes – Brought to You by Telephone World

https://evan-doorbell.com/
3•mikecarlton•38m ago•0 comments

Using any C++ library in Godot

https://blog.conan.io/cpp/conan/gamedev/godot/cmake/2026/09/29/Using-Any-Cpp-Library-In-Godot.html
15•czoido•39m ago•3 comments