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

Faulty Towers, vibe sickness, and the vibe bobsled

https://dustycloud.org/blog/faulty-towers-vibe-sickness-and-the-vibe-bobsled/
1•sanqui•2m ago•1 comments

Google Weather Lab 2

https://deepmind.google.com/science/weatherlab
2•xnx•6m ago•0 comments

Show HN: Tests.ws – WebSocket testing tools, language guides, Chrome extension

https://tests.ws/
1•gingermanymph•6m ago•0 comments

Aurora DSQL: Scalable, Multi-Region OLTP

https://arxiv.org/abs/2607.13276
2•shenli3514•7m ago•0 comments

Sliding into Silence? We Are Speaking 300 Daily Words Fewer Every Year

https://journals.sagepub.com/doi/10.1177/17456916261425131
1•Pamar•8m ago•0 comments

China's Latest A.I. Breakthrough Threatens America's Lead

https://www.nytimes.com/2026/07/17/business/china-ai-moonshot-kimi.html
1•petilon•9m ago•0 comments

Grumpy Website

https://grumpy.website/
3•Gecko4072•10m ago•0 comments

The first patch is a price check, not the product

https://github.blog/engineering/the-cost-of-saying-yes-has-changed/
1•logickkk1•10m ago•0 comments

Static search trees: 40x faster than binary search (2024)

https://curiouscoding.nl/posts/static-search-tree/
1•lalitmaganti•13m ago•0 comments

China's Xi Jinping launches new AI alliance, WAICO

https://www.aljazeera.com/news/2026/7/17/chinas-xi-jinping-launches-new-ai-alliance-what-is-it
2•culi•13m ago•2 comments

Recreating the best engineering zine from the 90s

https://circazine.hackclub.com/
2•lsanchezz•14m ago•0 comments

France blocks access to Polymarket website

https://www.reuters.com/technology/french-internet-service-providers-told-block-access-polymarket...
2•1659447091•15m ago•1 comments

Ask HN: Did you try Nordstjernen Web Browser 1.0.19 yet?

2•roschdal•15m ago•1 comments

MLB restricts using dugout iPads for AI-assisted in-game strategy

https://www.espn.com/mlb/story/_/id/49385415/mlb-restricts-dugout-ipad-use-prevent-artificial-int...
1•HardwareLust•18m ago•0 comments

Linus Torvalds to critics of AI coding in Linux: "Fork it. Or just walk away."

https://arstechnica.com/ai/2026/07/linus-torvalds-to-critics-of-ai-coding-in-linux-fork-it-or-jus...
5•baal80spam•18m ago•0 comments

Google Earth Pro for desktop will no longer be available to download soon

https://www.techradar.com/computing/the-impact-to-thousands-of-companies-across-industries-will-b...
1•asoberbeck•19m ago•0 comments

Chemical Onshoring of All Kinds

https://www.science.org/content/blog-post/chemical-onshoring-all-kinds
1•EA-3167•20m ago•0 comments

CollpaseOS: Program microcontrollers through civilizational collapse

https://collapseos.org/
1•Gecko4072•20m ago•0 comments

Apple Passed Nvidia to Become Most Valuable Company Again

https://www.macrumors.com/2026/07/17/apple-passed-nvidia-most-valuable-company/
1•tosh•23m ago•0 comments

Talking Postgres: Working on Postgres After 13 Years on SQL Server

https://talkingpostgres.com/episodes/working-on-postgres-after-13-years-on-sql-server-with-panagi...
2•clairegiordano•24m ago•0 comments

Painting the sides of railroad rails white to reduce derailment

https://www.up.com/news/safety/Tracking-Rail-Heat-260608
2•zdw•25m ago•0 comments

How to Make a Triode Yourself

https://simplifier.neocities.org/triode2
3•Gecko4072•25m ago•0 comments

Show HN: Argument duello game with your friend – AI judge decides who's right

https://wram.chat
1•revolt2tech•26m ago•0 comments

Tech note: making your own V-I plots at home

https://lcamtuf.substack.com/p/tech-note-making-your-own-v-i-plots
1•zdw•28m ago•0 comments

Pre-Authentication RCE in WordPress Core

https://wp2shell.com/
3•patrikg•30m ago•0 comments

When you give a Nix Developer in charge of a website

https://twitter.com/Malix_Labs/status/2077521369663742252
2•eveeifyeve•34m ago•0 comments

We Built Sandbox Infrastructure for Autonomous Agents

https://neosigma.ai/blog/agent-workspaces
2•AdityaBilawar•34m ago•0 comments

T-Mobile's billing-system migration made free lines billable

https://arstechnica.com/tech-policy/2026/07/t-mobile-bungled-forced-plan-migration-canceling-some...
2•logickkk1•35m ago•0 comments

Cabure: Small Gitops Operator

https://github.com/GreedyKomodoDragon/cabure
1•greedykomodo•36m ago•0 comments

Automated job application system, sponsored by the American Mathematical Society

https://www.mathjobs.org/jobs
2•Eridanus2•36m ago•0 comments