Lines Matching refs:current_buffer

118 	struct micro_snapshot_buffer *current_buffer);
755 struct micro_snapshot_buffer *current_buffer = target->buffer; in telemetry_process_sample() local
870 if (!current_buffer->buffer) { in telemetry_process_sample()
885 current_record_start = current_buffer->current_position; in telemetry_process_sample()
887 if ((current_buffer->size - current_buffer->current_position) < sizeof(struct micro_snapshot)) { in telemetry_process_sample()
892 current_buffer->end_point = current_record_start; in telemetry_process_sample()
893 current_buffer->current_position = 0; in telemetry_process_sample()
902 …msnap = (struct micro_snapshot *)(uintptr_t)(current_buffer->buffer + current_buffer->current_posi… in telemetry_process_sample()
910 current_buffer->current_position += sizeof(struct micro_snapshot); in telemetry_process_sample()
912 if ((current_buffer->size - current_buffer->current_position) < sizeof(struct task_snapshot)) { in telemetry_process_sample()
913 current_buffer->end_point = current_record_start; in telemetry_process_sample()
914 current_buffer->current_position = 0; in telemetry_process_sample()
923 …tsnap = (struct task_snapshot *)(uintptr_t)(current_buffer->buffer + current_buffer->current_posit… in telemetry_process_sample()
988 current_buffer->current_position += sizeof(struct task_snapshot); in telemetry_process_sample()
994 if ((current_buffer->size - current_buffer->current_position) < uuid_info_array_size) { in telemetry_process_sample()
995 current_buffer->end_point = current_record_start; in telemetry_process_sample()
996 current_buffer->current_position = 0; in telemetry_process_sample()
1009 …bcopy(uuid_info_array, (char *)(current_buffer->buffer + current_buffer->current_position), uuid_i… in telemetry_process_sample()
1013 current_buffer->current_position += uuid_info_array_size; in telemetry_process_sample()
1019 if ((current_buffer->size - current_buffer->current_position) < sizeof(struct thread_snapshot)) { in telemetry_process_sample()
1021 current_buffer->end_point = current_record_start; in telemetry_process_sample()
1022 current_buffer->current_position = 0; in telemetry_process_sample()
1031 …thsnap = (struct thread_snapshot *)(uintptr_t)(current_buffer->buffer + current_buffer->current_po… in telemetry_process_sample()
1058 current_buffer->current_position += sizeof(struct thread_snapshot); in telemetry_process_sample()
1064 if ((current_buffer->size - current_buffer->current_position) < sizeof(dqserialnum)) { in telemetry_process_sample()
1066 current_buffer->end_point = current_record_start; in telemetry_process_sample()
1067 current_buffer->current_position = 0; in telemetry_process_sample()
1077 …bcopy(&dqserialnum, (char *)current_buffer->buffer + current_buffer->current_position, sizeof(dqse… in telemetry_process_sample()
1078 current_buffer->current_position += sizeof(dqserialnum); in telemetry_process_sample()
1092 if ((current_buffer->size - current_buffer->current_position) / framesize < btcount) { in telemetry_process_sample()
1093 current_buffer->end_point = current_record_start; in telemetry_process_sample()
1094 current_buffer->current_position = 0; in telemetry_process_sample()
1103 for (bti = 0; bti < btcount; bti++, current_buffer->current_position += framesize) { in telemetry_process_sample()
1105 … *(uint64_t *)(uintptr_t)(current_buffer->buffer + current_buffer->current_position) = frames[bti]; in telemetry_process_sample()
1107 …*(uint32_t *)(uintptr_t)(current_buffer->buffer + current_buffer->current_position) = (uint32_t)fr… in telemetry_process_sample()
1111 if (current_buffer->end_point < current_buffer->current_position) { in telemetry_process_sample()
1118 current_buffer->end_point = current_buffer->current_position; in telemetry_process_sample()
1126 if (current_buffer == &telemetry_buffer) { in telemetry_process_sample()
1127 telemetry_bytes_since_last_mark += (current_buffer->current_position - current_record_start); in telemetry_process_sample()
1183 …her(user_addr_t buffer, uint32_t *length, bool mark, struct micro_snapshot_buffer * current_buffer) in telemetry_buffer_gather() argument
1190 (&telemetry_buffer != current_buffer)); in telemetry_buffer_gather()
1194 if (current_buffer->buffer == 0) { in telemetry_buffer_gather()
1199 if (*length < current_buffer->size) { in telemetry_buffer_gather()
1208 oldest_record_offset = current_buffer->current_position; in telemetry_buffer_gather()
1210 if (((oldest_record_offset + sizeof(uint32_t)) > current_buffer->size) || in telemetry_buffer_gather()
1211 ((oldest_record_offset + sizeof(uint32_t)) > current_buffer->end_point)) { in telemetry_buffer_gather()
1212 if (*(uint32_t *)(uintptr_t)(current_buffer->buffer) == 0) { in telemetry_buffer_gather()
1227 assert(*(uint32_t *)(uintptr_t)(current_buffer->buffer) == STACKSHOT_MICRO_SNAPSHOT_MAGIC); in telemetry_buffer_gather()
1231 …if (*(uint32_t *)(uintptr_t)(current_buffer->buffer + oldest_record_offset) == STACKSHOT_MICRO_SNA… in telemetry_buffer_gather()
1240 } while (oldest_record_offset != current_buffer->current_position); in telemetry_buffer_gather()
1248 log_telemetry_output(current_buffer->buffer, oldest_record_offset, in telemetry_buffer_gather()
1249 current_buffer->end_point - oldest_record_offset); in telemetry_buffer_gather()
1251 if ((result = copyout((void *)(current_buffer->buffer + oldest_record_offset), buffer, in telemetry_buffer_gather()
1252 current_buffer->end_point - oldest_record_offset)) != 0) { in telemetry_buffer_gather()
1256 *length = current_buffer->end_point - oldest_record_offset; in telemetry_buffer_gather()
1262 log_telemetry_output(current_buffer->buffer, 0, current_buffer->current_position); in telemetry_buffer_gather()
1264 if ((result = copyout((void *)current_buffer->buffer, buffer + *length, in telemetry_buffer_gather()
1265 current_buffer->current_position)) != 0) { in telemetry_buffer_gather()
1269 *length += (uint32_t)current_buffer->current_position; in telemetry_buffer_gather()
1280 current_buffer->current_position, *length, in telemetry_buffer_gather()
1281 current_buffer->end_point, (&telemetry_buffer != current_buffer)); in telemetry_buffer_gather()