A method, system, and computer readable medium for synchronizing
performance monitors in the multiprocessor system are disclosed. The
system includes a lead processor and at least one slave processor. The
method includes informing the slave processor that a synchronization
signal is forthcoming and waiting for an acknowledgment indicating that
the slave processor is ready to receive the synchronization signal. In
response to the slave processor's acknowledgment, the method includes
sending the synchronization signal to the slave processor. The lead
processor's performance monitors are set when the synchronization signal
is sent and the slave processor's performance monitors are sent when the
synchronization signal is received by the slave processor. In one
embodiment, informing the slave processor that a synchronization signal is
forthcoming is achieved by issuing a first inter-processor interrupt. In
one embodiment, the sending of the synchronization signal is achieved by
issuing a second interprocessor interrupt. In one configuration, waiting
for the acknowledgment is accomplished by executing a spin loop with the
lead processor. In one embodiment, the values set in the lead processor
performance monitors are offset from the value set in the slave processor
performance monitors, preferably by an offset that is indicative of the
delay required for the synchronization signal to propagate from the lead
processor to the slave processor.