Lines Matching refs:current_buffer
121 struct micro_snapshot_buffer *current_buffer);
801 struct micro_snapshot_buffer *current_buffer = target->buffer; in telemetry_process_sample() local
916 if (!current_buffer->buffer) { in telemetry_process_sample()
931 current_record_start = current_buffer->current_position; in telemetry_process_sample()
933 if ((current_buffer->size - current_buffer->current_position) < sizeof(struct micro_snapshot)) { in telemetry_process_sample()
938 current_buffer->end_point = current_record_start; in telemetry_process_sample()
939 current_buffer->current_position = 0; in telemetry_process_sample()
948 …msnap = (struct micro_snapshot *)(uintptr_t)(current_buffer->buffer + current_buffer->current_posi… in telemetry_process_sample()
956 current_buffer->current_position += sizeof(struct micro_snapshot); in telemetry_process_sample()
958 if ((current_buffer->size - current_buffer->current_position) < sizeof(struct task_snapshot)) { in telemetry_process_sample()
959 current_buffer->end_point = current_record_start; in telemetry_process_sample()
960 current_buffer->current_position = 0; in telemetry_process_sample()
969 …tsnap = (struct task_snapshot *)(uintptr_t)(current_buffer->buffer + current_buffer->current_posit… in telemetry_process_sample()
1042 current_buffer->current_position += sizeof(struct task_snapshot); in telemetry_process_sample()
1048 if ((current_buffer->size - current_buffer->current_position) < uuid_info_array_size) { in telemetry_process_sample()
1049 current_buffer->end_point = current_record_start; in telemetry_process_sample()
1050 current_buffer->current_position = 0; in telemetry_process_sample()
1063 …bcopy(uuid_info_array, (char *)(current_buffer->buffer + current_buffer->current_position), uuid_i… in telemetry_process_sample()
1067 current_buffer->current_position += uuid_info_array_size; in telemetry_process_sample()
1073 if ((current_buffer->size - current_buffer->current_position) < sizeof(struct thread_snapshot)) { in telemetry_process_sample()
1075 current_buffer->end_point = current_record_start; in telemetry_process_sample()
1076 current_buffer->current_position = 0; in telemetry_process_sample()
1085 …thsnap = (struct thread_snapshot *)(uintptr_t)(current_buffer->buffer + current_buffer->current_po… in telemetry_process_sample()
1112 current_buffer->current_position += sizeof(struct thread_snapshot); in telemetry_process_sample()
1118 if ((current_buffer->size - current_buffer->current_position) < sizeof(dqserialnum)) { in telemetry_process_sample()
1120 current_buffer->end_point = current_record_start; in telemetry_process_sample()
1121 current_buffer->current_position = 0; in telemetry_process_sample()
1131 …bcopy(&dqserialnum, (char *)current_buffer->buffer + current_buffer->current_position, sizeof(dqse… in telemetry_process_sample()
1132 current_buffer->current_position += sizeof(dqserialnum); in telemetry_process_sample()
1146 if ((current_buffer->size - current_buffer->current_position) / framesize < btcount) { in telemetry_process_sample()
1147 current_buffer->end_point = current_record_start; in telemetry_process_sample()
1148 current_buffer->current_position = 0; in telemetry_process_sample()
1157 for (bti = 0; bti < btcount; bti++, current_buffer->current_position += framesize) { in telemetry_process_sample()
1159 … *(uint64_t *)(uintptr_t)(current_buffer->buffer + current_buffer->current_position) = frames[bti]; in telemetry_process_sample()
1161 …*(uint32_t *)(uintptr_t)(current_buffer->buffer + current_buffer->current_position) = (uint32_t)fr… in telemetry_process_sample()
1165 if (current_buffer->end_point < current_buffer->current_position) { in telemetry_process_sample()
1172 current_buffer->end_point = current_buffer->current_position; in telemetry_process_sample()
1180 if (current_buffer == &telemetry_buffer) { in telemetry_process_sample()
1181 telemetry_bytes_since_last_mark += (current_buffer->current_position - current_record_start); in telemetry_process_sample()
1237 …her(user_addr_t buffer, uint32_t *length, bool mark, struct micro_snapshot_buffer * current_buffer) in telemetry_buffer_gather() argument
1244 (&telemetry_buffer != current_buffer)); in telemetry_buffer_gather()
1248 if (current_buffer->buffer == 0) { in telemetry_buffer_gather()
1253 if (*length < current_buffer->size) { in telemetry_buffer_gather()
1262 oldest_record_offset = current_buffer->current_position; in telemetry_buffer_gather()
1264 if (((oldest_record_offset + sizeof(uint32_t)) > current_buffer->size) || in telemetry_buffer_gather()
1265 ((oldest_record_offset + sizeof(uint32_t)) > current_buffer->end_point)) { in telemetry_buffer_gather()
1266 if (*(uint32_t *)(uintptr_t)(current_buffer->buffer) == 0) { in telemetry_buffer_gather()
1281 assert(*(uint32_t *)(uintptr_t)(current_buffer->buffer) == STACKSHOT_MICRO_SNAPSHOT_MAGIC); in telemetry_buffer_gather()
1285 …if (*(uint32_t *)(uintptr_t)(current_buffer->buffer + oldest_record_offset) == STACKSHOT_MICRO_SNA… in telemetry_buffer_gather()
1294 } while (oldest_record_offset != current_buffer->current_position); in telemetry_buffer_gather()
1302 log_telemetry_output(current_buffer->buffer, oldest_record_offset, in telemetry_buffer_gather()
1303 current_buffer->end_point - oldest_record_offset); in telemetry_buffer_gather()
1305 if ((result = copyout((void *)(current_buffer->buffer + oldest_record_offset), buffer, in telemetry_buffer_gather()
1306 current_buffer->end_point - oldest_record_offset)) != 0) { in telemetry_buffer_gather()
1310 *length = current_buffer->end_point - oldest_record_offset; in telemetry_buffer_gather()
1316 log_telemetry_output(current_buffer->buffer, 0, current_buffer->current_position); in telemetry_buffer_gather()
1318 if ((result = copyout((void *)current_buffer->buffer, buffer + *length, in telemetry_buffer_gather()
1319 current_buffer->current_position)) != 0) { in telemetry_buffer_gather()
1323 *length += (uint32_t)current_buffer->current_position; in telemetry_buffer_gather()
1334 current_buffer->current_position, *length, in telemetry_buffer_gather()
1335 current_buffer->end_point, (&telemetry_buffer != current_buffer)); in telemetry_buffer_gather()