Lines Matching refs:current_buffer
116 struct micro_snapshot_buffer *current_buffer);
738 struct micro_snapshot_buffer *current_buffer = target->buffer; in telemetry_process_sample() local
853 if (!current_buffer->buffer) { in telemetry_process_sample()
868 current_record_start = current_buffer->current_position; in telemetry_process_sample()
870 if ((current_buffer->size - current_buffer->current_position) < sizeof(struct micro_snapshot)) { in telemetry_process_sample()
875 current_buffer->end_point = current_record_start; in telemetry_process_sample()
876 current_buffer->current_position = 0; in telemetry_process_sample()
885 …msnap = (struct micro_snapshot *)(uintptr_t)(current_buffer->buffer + current_buffer->current_posi… in telemetry_process_sample()
893 current_buffer->current_position += sizeof(struct micro_snapshot); in telemetry_process_sample()
895 if ((current_buffer->size - current_buffer->current_position) < sizeof(struct task_snapshot)) { in telemetry_process_sample()
896 current_buffer->end_point = current_record_start; in telemetry_process_sample()
897 current_buffer->current_position = 0; in telemetry_process_sample()
906 …tsnap = (struct task_snapshot *)(uintptr_t)(current_buffer->buffer + current_buffer->current_posit… in telemetry_process_sample()
965 current_buffer->current_position += sizeof(struct task_snapshot); in telemetry_process_sample()
971 if ((current_buffer->size - current_buffer->current_position) < uuid_info_array_size) { in telemetry_process_sample()
972 current_buffer->end_point = current_record_start; in telemetry_process_sample()
973 current_buffer->current_position = 0; in telemetry_process_sample()
986 …bcopy(uuid_info_array, (char *)(current_buffer->buffer + current_buffer->current_position), uuid_i… in telemetry_process_sample()
990 current_buffer->current_position += uuid_info_array_size; in telemetry_process_sample()
996 if ((current_buffer->size - current_buffer->current_position) < sizeof(struct thread_snapshot)) { in telemetry_process_sample()
998 current_buffer->end_point = current_record_start; in telemetry_process_sample()
999 current_buffer->current_position = 0; in telemetry_process_sample()
1008 …thsnap = (struct thread_snapshot *)(uintptr_t)(current_buffer->buffer + current_buffer->current_po… in telemetry_process_sample()
1038 current_buffer->current_position += sizeof(struct thread_snapshot); in telemetry_process_sample()
1044 if ((current_buffer->size - current_buffer->current_position) < sizeof(dqserialnum)) { in telemetry_process_sample()
1046 current_buffer->end_point = current_record_start; in telemetry_process_sample()
1047 current_buffer->current_position = 0; in telemetry_process_sample()
1057 …bcopy(&dqserialnum, (char *)current_buffer->buffer + current_buffer->current_position, sizeof(dqse… in telemetry_process_sample()
1058 current_buffer->current_position += sizeof(dqserialnum); in telemetry_process_sample()
1072 if ((current_buffer->size - current_buffer->current_position) / framesize < btcount) { 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()
1083 for (bti = 0; bti < btcount; bti++, current_buffer->current_position += framesize) { in telemetry_process_sample()
1085 … *(uint64_t *)(uintptr_t)(current_buffer->buffer + current_buffer->current_position) = frames[bti]; in telemetry_process_sample()
1087 …*(uint32_t *)(uintptr_t)(current_buffer->buffer + current_buffer->current_position) = (uint32_t)fr… in telemetry_process_sample()
1091 if (current_buffer->end_point < current_buffer->current_position) { in telemetry_process_sample()
1098 current_buffer->end_point = current_buffer->current_position; in telemetry_process_sample()
1106 if (current_buffer == &telemetry_buffer) { in telemetry_process_sample()
1107 telemetry_bytes_since_last_mark += (current_buffer->current_position - current_record_start); in telemetry_process_sample()
1163 …her(user_addr_t buffer, uint32_t *length, bool mark, struct micro_snapshot_buffer * current_buffer) in telemetry_buffer_gather() argument
1170 (&telemetry_buffer != current_buffer)); in telemetry_buffer_gather()
1174 if (current_buffer->buffer == 0) { in telemetry_buffer_gather()
1179 if (*length < current_buffer->size) { in telemetry_buffer_gather()
1188 oldest_record_offset = current_buffer->current_position; in telemetry_buffer_gather()
1190 if (((oldest_record_offset + sizeof(uint32_t)) > current_buffer->size) || in telemetry_buffer_gather()
1191 ((oldest_record_offset + sizeof(uint32_t)) > current_buffer->end_point)) { in telemetry_buffer_gather()
1192 if (*(uint32_t *)(uintptr_t)(current_buffer->buffer) == 0) { in telemetry_buffer_gather()
1207 assert(*(uint32_t *)(uintptr_t)(current_buffer->buffer) == STACKSHOT_MICRO_SNAPSHOT_MAGIC); in telemetry_buffer_gather()
1211 …if (*(uint32_t *)(uintptr_t)(current_buffer->buffer + oldest_record_offset) == STACKSHOT_MICRO_SNA… in telemetry_buffer_gather()
1220 } while (oldest_record_offset != current_buffer->current_position); in telemetry_buffer_gather()
1228 log_telemetry_output(current_buffer->buffer, oldest_record_offset, in telemetry_buffer_gather()
1229 current_buffer->end_point - oldest_record_offset); in telemetry_buffer_gather()
1231 if ((result = copyout((void *)(current_buffer->buffer + oldest_record_offset), buffer, in telemetry_buffer_gather()
1232 current_buffer->end_point - oldest_record_offset)) != 0) { in telemetry_buffer_gather()
1236 *length = current_buffer->end_point - oldest_record_offset; in telemetry_buffer_gather()
1242 log_telemetry_output(current_buffer->buffer, 0, current_buffer->current_position); in telemetry_buffer_gather()
1244 if ((result = copyout((void *)current_buffer->buffer, buffer + *length, in telemetry_buffer_gather()
1245 current_buffer->current_position)) != 0) { in telemetry_buffer_gather()
1249 *length += (uint32_t)current_buffer->current_position; in telemetry_buffer_gather()
1260 current_buffer->current_position, *length, in telemetry_buffer_gather()
1261 current_buffer->end_point, (&telemetry_buffer != current_buffer)); in telemetry_buffer_gather()