Hacker News new | ask | show | jobs
by jkadlec 3760 days ago
As far as I know, the only way to have something close to Wireshark for CPUs is to do a simulation. Then you can measure network latencies, cache hits and so on, but the simulation will be extremely slow. There's GEM5 (http://www.gem5.org) - a simulator with couple of DSLs designed to do just that, but I'd bet that Intel has their own thing. I did my thesis on simulating MESIF in GEM5, here's a link: https://dip.felk.cvut.cz/browse/pdfcache/kadlej16_2013dipl.p... , that could get people started if they are interested (it also might be a good introduction into the subject of cache coherency protocols). I have the code laying around somewhere, I've been wanting to make it public, but it needs cleanup first.
3 comments

I think the closest thing to a Wireshark for CPUs is Intel VTune (https://software.intel.com/en-us/intel-vtune-amplifier-xe)
Actually, you can buy a JTAG debugger [0] for Intel CPUs. It's going to cost you though.

[0] - https://software.intel.com/en-us/articles/intel-system-studi...

Wouldn't the equivalent of that be a JTAG debugger for the NIC?
Although it isn't equivalent to wireshark, linux's perf command (no doubt osx/win/bsd have their own) is close enough and very easy to use.

It exposes a very large number of CPU counters, including cache misses etc.

Not quite as thorough as simulating. But probably more useful in practice.

There was one for powerpcs (PSIM?) that IBM put out during the mac/power days.

But generally you run benchmarks to figure out what the costs are and performance counters to see how often your code is paying those costs.