Lines Matching refs:current_buffer
123 struct micro_snapshot_buffer *current_buffer);
729 struct micro_snapshot_buffer *current_buffer = target->buffer; in telemetry_process_sample() local
852 if (!current_buffer->buffer) { in telemetry_process_sample()
867 current_record_start = current_buffer->current_position; in telemetry_process_sample()
869 if ((current_buffer->size - current_buffer->current_position) < sizeof(struct micro_snapshot)) { in telemetry_process_sample()
874 current_buffer->end_point = current_record_start; in telemetry_process_sample()
875 current_buffer->current_position = 0; in telemetry_process_sample()
884 …msnap = (struct micro_snapshot *)(uintptr_t)(current_buffer->buffer + current_buffer->current_posi… in telemetry_process_sample()
892 current_buffer->current_position += sizeof(struct micro_snapshot); in telemetry_process_sample()
894 if ((current_buffer->size - current_buffer->current_position) < sizeof(struct task_snapshot)) { in telemetry_process_sample()
895 current_buffer->end_point = current_record_start; in telemetry_process_sample()
896 current_buffer->current_position = 0; in telemetry_process_sample()
905 …tsnap = (struct task_snapshot *)(uintptr_t)(current_buffer->buffer + current_buffer->current_posit… in telemetry_process_sample()
995 current_buffer->current_position += sizeof(struct task_snapshot); in telemetry_process_sample()
1001 if ((current_buffer->size - current_buffer->current_position) < uuid_info_array_size) { in telemetry_process_sample()
1002 current_buffer->end_point = current_record_start; in telemetry_process_sample()
1003 current_buffer->current_position = 0; in telemetry_process_sample()
1016 …bcopy(uuid_info_array, (char *)(current_buffer->buffer + current_buffer->current_position), uuid_i… in telemetry_process_sample()
1020 current_buffer->current_position += uuid_info_array_size; in telemetry_process_sample()
1026 if ((current_buffer->size - current_buffer->current_position) < sizeof(struct thread_snapshot)) { in telemetry_process_sample()
1028 current_buffer->end_point = current_record_start; in telemetry_process_sample()
1029 current_buffer->current_position = 0; in telemetry_process_sample()
1038 …thsnap = (struct thread_snapshot *)(uintptr_t)(current_buffer->buffer + current_buffer->current_po… in telemetry_process_sample()
1065 current_buffer->current_position += sizeof(struct thread_snapshot); in telemetry_process_sample()
1071 if ((current_buffer->size - current_buffer->current_position) < sizeof(dqserialnum)) { in telemetry_process_sample()
1073 current_buffer->end_point = current_record_start; in telemetry_process_sample()
1074 current_buffer->current_position = 0; in telemetry_process_sample()
1084 …bcopy(&dqserialnum, (char *)current_buffer->buffer + current_buffer->current_position, sizeof(dqse… in telemetry_process_sample()
1085 current_buffer->current_position += sizeof(dqserialnum); in telemetry_process_sample()
1099 if ((current_buffer->size - current_buffer->current_position) / framesize < btcount) { in telemetry_process_sample()
1100 current_buffer->end_point = current_record_start; in telemetry_process_sample()
1101 current_buffer->current_position = 0; in telemetry_process_sample()
1110 for (bti = 0; bti < btcount; bti++, current_buffer->current_position += framesize) { in telemetry_process_sample()
1112 … *(uint64_t *)(uintptr_t)(current_buffer->buffer + current_buffer->current_position) = frames[bti]; in telemetry_process_sample()
1114 …*(uint32_t *)(uintptr_t)(current_buffer->buffer + current_buffer->current_position) = (uint32_t)fr… in telemetry_process_sample()
1118 if (current_buffer->end_point < current_buffer->current_position) { in telemetry_process_sample()
1125 current_buffer->end_point = current_buffer->current_position; in telemetry_process_sample()
1133 if (current_buffer == &telemetry_buffer) { in telemetry_process_sample()
1134 telemetry_bytes_since_last_mark += (current_buffer->current_position - current_record_start); in telemetry_process_sample()
1190 …her(user_addr_t buffer, uint32_t *length, bool mark, struct micro_snapshot_buffer * current_buffer) in telemetry_buffer_gather() argument
1197 (&telemetry_buffer != current_buffer)); in telemetry_buffer_gather()
1201 if (current_buffer->buffer == 0) { in telemetry_buffer_gather()
1206 if (*length < current_buffer->size) { in telemetry_buffer_gather()
1215 oldest_record_offset = current_buffer->current_position; in telemetry_buffer_gather()
1217 if (((oldest_record_offset + sizeof(uint32_t)) > current_buffer->size) || in telemetry_buffer_gather()
1218 ((oldest_record_offset + sizeof(uint32_t)) > current_buffer->end_point)) { in telemetry_buffer_gather()
1219 if (*(uint32_t *)(uintptr_t)(current_buffer->buffer) == 0) { in telemetry_buffer_gather()
1234 assert(*(uint32_t *)(uintptr_t)(current_buffer->buffer) == STACKSHOT_MICRO_SNAPSHOT_MAGIC); in telemetry_buffer_gather()
1238 …if (*(uint32_t *)(uintptr_t)(current_buffer->buffer + oldest_record_offset) == STACKSHOT_MICRO_SNA… in telemetry_buffer_gather()
1247 } while (oldest_record_offset != current_buffer->current_position); in telemetry_buffer_gather()
1255 log_telemetry_output(current_buffer->buffer, oldest_record_offset, in telemetry_buffer_gather()
1256 current_buffer->end_point - oldest_record_offset); in telemetry_buffer_gather()
1258 if ((result = copyout((void *)(current_buffer->buffer + oldest_record_offset), buffer, in telemetry_buffer_gather()
1259 current_buffer->end_point - oldest_record_offset)) != 0) { in telemetry_buffer_gather()
1263 *length = current_buffer->end_point - oldest_record_offset; in telemetry_buffer_gather()
1269 log_telemetry_output(current_buffer->buffer, 0, current_buffer->current_position); in telemetry_buffer_gather()
1271 if ((result = copyout((void *)current_buffer->buffer, buffer + *length, in telemetry_buffer_gather()
1272 current_buffer->current_position)) != 0) { in telemetry_buffer_gather()
1276 *length += (uint32_t)current_buffer->current_position; in telemetry_buffer_gather()
1287 current_buffer->current_position, *length, in telemetry_buffer_gather()
1288 current_buffer->end_point, (&telemetry_buffer != current_buffer)); in telemetry_buffer_gather()