Lines Matching refs:current_buffer
122 struct micro_snapshot_buffer *current_buffer);
802 struct micro_snapshot_buffer *current_buffer = target->buffer; in telemetry_process_sample() local
917 if (!current_buffer->buffer) { in telemetry_process_sample()
932 current_record_start = current_buffer->current_position; in telemetry_process_sample()
934 if ((current_buffer->size - current_buffer->current_position) < sizeof(struct micro_snapshot)) { in telemetry_process_sample()
939 current_buffer->end_point = current_record_start; in telemetry_process_sample()
940 current_buffer->current_position = 0; in telemetry_process_sample()
949 …msnap = (struct micro_snapshot *)(uintptr_t)(current_buffer->buffer + current_buffer->current_posi… in telemetry_process_sample()
957 current_buffer->current_position += sizeof(struct micro_snapshot); in telemetry_process_sample()
959 if ((current_buffer->size - current_buffer->current_position) < sizeof(struct task_snapshot)) { in telemetry_process_sample()
960 current_buffer->end_point = current_record_start; in telemetry_process_sample()
961 current_buffer->current_position = 0; in telemetry_process_sample()
970 …tsnap = (struct task_snapshot *)(uintptr_t)(current_buffer->buffer + current_buffer->current_posit… in telemetry_process_sample()
1050 current_buffer->current_position += sizeof(struct task_snapshot); in telemetry_process_sample()
1056 if ((current_buffer->size - current_buffer->current_position) < uuid_info_array_size) { in telemetry_process_sample()
1057 current_buffer->end_point = current_record_start; in telemetry_process_sample()
1058 current_buffer->current_position = 0; in telemetry_process_sample()
1071 …bcopy(uuid_info_array, (char *)(current_buffer->buffer + current_buffer->current_position), uuid_i… in telemetry_process_sample()
1075 current_buffer->current_position += uuid_info_array_size; in telemetry_process_sample()
1081 if ((current_buffer->size - current_buffer->current_position) < sizeof(struct thread_snapshot)) { in telemetry_process_sample()
1083 current_buffer->end_point = current_record_start; in telemetry_process_sample()
1084 current_buffer->current_position = 0; in telemetry_process_sample()
1093 …thsnap = (struct thread_snapshot *)(uintptr_t)(current_buffer->buffer + current_buffer->current_po… in telemetry_process_sample()
1120 current_buffer->current_position += sizeof(struct thread_snapshot); in telemetry_process_sample()
1126 if ((current_buffer->size - current_buffer->current_position) < sizeof(dqserialnum)) { in telemetry_process_sample()
1128 current_buffer->end_point = current_record_start; in telemetry_process_sample()
1129 current_buffer->current_position = 0; in telemetry_process_sample()
1139 …bcopy(&dqserialnum, (char *)current_buffer->buffer + current_buffer->current_position, sizeof(dqse… in telemetry_process_sample()
1140 current_buffer->current_position += sizeof(dqserialnum); in telemetry_process_sample()
1154 if ((current_buffer->size - current_buffer->current_position) / framesize < btcount) { in telemetry_process_sample()
1155 current_buffer->end_point = current_record_start; in telemetry_process_sample()
1156 current_buffer->current_position = 0; in telemetry_process_sample()
1165 for (bti = 0; bti < btcount; bti++, current_buffer->current_position += framesize) { in telemetry_process_sample()
1167 … *(uint64_t *)(uintptr_t)(current_buffer->buffer + current_buffer->current_position) = frames[bti]; in telemetry_process_sample()
1169 …*(uint32_t *)(uintptr_t)(current_buffer->buffer + current_buffer->current_position) = (uint32_t)fr… in telemetry_process_sample()
1173 if (current_buffer->end_point < current_buffer->current_position) { in telemetry_process_sample()
1180 current_buffer->end_point = current_buffer->current_position; in telemetry_process_sample()
1188 if (current_buffer == &telemetry_buffer) { in telemetry_process_sample()
1189 telemetry_bytes_since_last_mark += (current_buffer->current_position - current_record_start); in telemetry_process_sample()
1245 …her(user_addr_t buffer, uint32_t *length, bool mark, struct micro_snapshot_buffer * current_buffer) in telemetry_buffer_gather() argument
1252 (&telemetry_buffer != current_buffer)); in telemetry_buffer_gather()
1256 if (current_buffer->buffer == 0) { in telemetry_buffer_gather()
1261 if (*length < current_buffer->size) { in telemetry_buffer_gather()
1270 oldest_record_offset = current_buffer->current_position; in telemetry_buffer_gather()
1272 if (((oldest_record_offset + sizeof(uint32_t)) > current_buffer->size) || in telemetry_buffer_gather()
1273 ((oldest_record_offset + sizeof(uint32_t)) > current_buffer->end_point)) { in telemetry_buffer_gather()
1274 if (*(uint32_t *)(uintptr_t)(current_buffer->buffer) == 0) { in telemetry_buffer_gather()
1289 assert(*(uint32_t *)(uintptr_t)(current_buffer->buffer) == STACKSHOT_MICRO_SNAPSHOT_MAGIC); in telemetry_buffer_gather()
1293 …if (*(uint32_t *)(uintptr_t)(current_buffer->buffer + oldest_record_offset) == STACKSHOT_MICRO_SNA… in telemetry_buffer_gather()
1302 } while (oldest_record_offset != current_buffer->current_position); in telemetry_buffer_gather()
1310 log_telemetry_output(current_buffer->buffer, oldest_record_offset, in telemetry_buffer_gather()
1311 current_buffer->end_point - oldest_record_offset); in telemetry_buffer_gather()
1313 if ((result = copyout((void *)(current_buffer->buffer + oldest_record_offset), buffer, in telemetry_buffer_gather()
1314 current_buffer->end_point - oldest_record_offset)) != 0) { in telemetry_buffer_gather()
1318 *length = current_buffer->end_point - oldest_record_offset; in telemetry_buffer_gather()
1324 log_telemetry_output(current_buffer->buffer, 0, current_buffer->current_position); in telemetry_buffer_gather()
1326 if ((result = copyout((void *)current_buffer->buffer, buffer + *length, in telemetry_buffer_gather()
1327 current_buffer->current_position)) != 0) { in telemetry_buffer_gather()
1331 *length += (uint32_t)current_buffer->current_position; in telemetry_buffer_gather()
1342 current_buffer->current_position, *length, in telemetry_buffer_gather()
1343 current_buffer->end_point, (&telemetry_buffer != current_buffer)); in telemetry_buffer_gather()