| 1213 | } |
| 1214 | |
| 1215 | void recordWindow(Buffer* buf, int tid, ProfilingWindow* event) { |
| 1216 | int start = buf->skip(1); |
| 1217 | buf->put8(T_WINDOW); |
| 1218 | buf->putVar64(event->_start_time); |
| 1219 | buf->putVar64(event->_end_time - event->_start_time); |
| 1220 | buf->putVar32(tid); |
| 1221 | buf->put8(start, buf->offset() - start); |
| 1222 | } |
| 1223 | |
| 1224 | void recordCpuLoad(Buffer* buf, float proc_user, float proc_system, float machine_total) { |
| 1225 | int start = buf->skip(1); |