Debugging CPU spikes in audio host

Upon alpha-testing my synth, I realized that it will sometimes produce CPU-spikes.
The CPU-meter in the host is usually in the low range, but it suddenly skyrockets for what seems to be a single sample. The result is a very noticeable click of course as the buffer is not completed.

The strange thing about it is that it is in no way reproducable (happens at random) but seems to be strongly encouraged by using parameter automation inside the host.

Now I’m unsure how to tackle this issue, and I’ve known about this for a few months now.

Is there some flag that is set if a buffer is not completed in time? I remember there being a name for this “buffer not completed in time” kind of event but can’t think of it. Or any other suggestion how to resolve this issue?

Might be caused by floating-point denormals? But really you’ll just have to profile it.