1. A method of preventing data loss for an exception write function associated with event tracing and trace consumption, the method comprising: detecting an event record to be written during exception handling; determining a usage level of a buffer for holding the event record; replacing original code with a jump to itself in response to the determining of the usage level, said replacing being executed during the exception handling; storing, during the exception handling, the original code and an address of the original code in response to the replacing of the original code; adjusting an exception delay in response to the determining of the usage level; executing the exception delay; and writing the event record to said buffer during the exception handling.