Add macro for recording atomic statics and report data races