Debugging SMP Code with UML
chromatic writes "It's easy to write code that works fine on single-processor systems but dies horribly on multi-processor boxes. Instead of spending thousands of dollars on a four- or eight-way system, you can use UML to emulate a multi-processor machine."
Unless I'm missing something, while I believe that the simulation of multiple CPUS could certainly help find certain kinds of bugs (like those provided as examples in the article), a lot of the nastier issues will only manifest themselves when you really have multiple CPUs that are really doing work at the same time. Folks that work with threads see this a lot: where a multi-threaded application works great on a single-cpu box; but on a multi-cpu box where those threads are really running at the same time, problems occur. So while this is a nice tool, I can't see releasing code for production that has never been tested on a machine that actually has multiple CPUs.
It's no speed demon, but it's about the nicest free tool for machine-level debugging.
And be able to use the -j flag to make
Do you even lift?
These aren't the 'roids you're looking for.
I wonder if there is limit to the number of simulated processors. Now people can simulate Linux running on a 1,000,000 CPU computer.
Imagine a Beowulf Cluster of these things!
cpeterso
Surely they've heard of the Unified Modeling Language? Why do developers so often reuse acronyms that are already widely in use? I mean surely with only so many letters, you're going to get collisions, but with something as already well known as UML... jeez.
They should really change the UML acronym... Unified Modeling Language is very commonly known among software professionals. Of course, it peaked my interest on how they were using UML as a debugger....
Is there a way I can get gcc to tell me what flags it uses? I'd like to understand why -O2 produces correct results on my code while -O3 doesn't, so I can figure out what flag is causing it.
This just illustrates that it is perfectly possible to optimise for high-end SMP machines on a little box at home.
Bye bye SCO. And good riddance
SO..;.. what is it?? My favorite is HAVARTI!!!!! yummy yummy yummy next best is sharp cheddar.