Lines Matching refs:current_buffer
121 struct micro_snapshot_buffer *current_buffer);
803 struct micro_snapshot_buffer *current_buffer = target->buffer; in telemetry_process_sample() local
918 if (!current_buffer->buffer) { in telemetry_process_sample()
933 current_record_start = current_buffer->current_position; in telemetry_process_sample()
935 if ((current_buffer->size - current_buffer->current_position) < sizeof(struct micro_snapshot)) { in telemetry_process_sample()
940 current_buffer->end_point = current_record_start; in telemetry_process_sample()
941 current_buffer->current_position = 0; in telemetry_process_sample()
950 …msnap = (struct micro_snapshot *)(uintptr_t)(current_buffer->buffer + current_buffer->current_posi… in telemetry_process_sample()
958 current_buffer->current_position += sizeof(struct micro_snapshot); in telemetry_process_sample()
960 if ((current_buffer->size - current_buffer->current_position) < sizeof(struct task_snapshot)) { in telemetry_process_sample()
961 current_buffer->end_point = current_record_start; in telemetry_process_sample()
962 current_buffer->current_position = 0; in telemetry_process_sample()
971 …tsnap = (struct task_snapshot *)(uintptr_t)(current_buffer->buffer + current_buffer->current_posit… in telemetry_process_sample()
1046 current_buffer->current_position += sizeof(struct task_snapshot); in telemetry_process_sample()
1052 if ((current_buffer->size - current_buffer->current_position) < uuid_info_array_size) { in telemetry_process_sample()
1053 current_buffer->end_point = current_record_start; in telemetry_process_sample()
1054 current_buffer->current_position = 0; in telemetry_process_sample()
1067 …bcopy(uuid_info_array, (char *)(current_buffer->buffer + current_buffer->current_position), uuid_i… in telemetry_process_sample()
1071 current_buffer->current_position += uuid_info_array_size; in telemetry_process_sample()
1077 if ((current_buffer->size - current_buffer->current_position) < sizeof(struct thread_snapshot)) { in telemetry_process_sample()
1079 current_buffer->end_point = current_record_start; in telemetry_process_sample()
1080 current_buffer->current_position = 0; in telemetry_process_sample()
1089 …thsnap = (struct thread_snapshot *)(uintptr_t)(current_buffer->buffer + current_buffer->current_po… in telemetry_process_sample()
1116 current_buffer->current_position += sizeof(struct thread_snapshot); in telemetry_process_sample()
1122 if ((current_buffer->size - current_buffer->current_position) < sizeof(dqserialnum)) { in telemetry_process_sample()
1124 current_buffer->end_point = current_record_start; in telemetry_process_sample()
1125 current_buffer->current_position = 0; in telemetry_process_sample()
1135 …bcopy(&dqserialnum, (char *)current_buffer->buffer + current_buffer->current_position, sizeof(dqse… in telemetry_process_sample()
1136 current_buffer->current_position += sizeof(dqserialnum); in telemetry_process_sample()
1150 if ((current_buffer->size - current_buffer->current_position) / framesize < btcount) { in telemetry_process_sample()
1151 current_buffer->end_point = current_record_start; in telemetry_process_sample()
1152 current_buffer->current_position = 0; in telemetry_process_sample()
1161 for (bti = 0; bti < btcount; bti++, current_buffer->current_position += framesize) { in telemetry_process_sample()
1163 … *(uint64_t *)(uintptr_t)(current_buffer->buffer + current_buffer->current_position) = frames[bti]; in telemetry_process_sample()
1165 …*(uint32_t *)(uintptr_t)(current_buffer->buffer + current_buffer->current_position) = (uint32_t)fr… in telemetry_process_sample()
1169 if (current_buffer->end_point < current_buffer->current_position) { in telemetry_process_sample()
1176 current_buffer->end_point = current_buffer->current_position; in telemetry_process_sample()
1184 if (current_buffer == &telemetry_buffer) { in telemetry_process_sample()
1185 telemetry_bytes_since_last_mark += (current_buffer->current_position - current_record_start); in telemetry_process_sample()
1241 …her(user_addr_t buffer, uint32_t *length, bool mark, struct micro_snapshot_buffer * current_buffer) in telemetry_buffer_gather() argument
1248 (&telemetry_buffer != current_buffer)); in telemetry_buffer_gather()
1252 if (current_buffer->buffer == 0) { in telemetry_buffer_gather()
1257 if (*length < current_buffer->size) { in telemetry_buffer_gather()
1266 oldest_record_offset = current_buffer->current_position; in telemetry_buffer_gather()
1268 if (((oldest_record_offset + sizeof(uint32_t)) > current_buffer->size) || in telemetry_buffer_gather()
1269 ((oldest_record_offset + sizeof(uint32_t)) > current_buffer->end_point)) { in telemetry_buffer_gather()
1270 if (*(uint32_t *)(uintptr_t)(current_buffer->buffer) == 0) { in telemetry_buffer_gather()
1285 assert(*(uint32_t *)(uintptr_t)(current_buffer->buffer) == STACKSHOT_MICRO_SNAPSHOT_MAGIC); in telemetry_buffer_gather()
1289 …if (*(uint32_t *)(uintptr_t)(current_buffer->buffer + oldest_record_offset) == STACKSHOT_MICRO_SNA… in telemetry_buffer_gather()
1298 } while (oldest_record_offset != current_buffer->current_position); in telemetry_buffer_gather()
1306 log_telemetry_output(current_buffer->buffer, oldest_record_offset, in telemetry_buffer_gather()
1307 current_buffer->end_point - oldest_record_offset); in telemetry_buffer_gather()
1309 if ((result = copyout((void *)(current_buffer->buffer + oldest_record_offset), buffer, in telemetry_buffer_gather()
1310 current_buffer->end_point - oldest_record_offset)) != 0) { in telemetry_buffer_gather()
1314 *length = current_buffer->end_point - oldest_record_offset; in telemetry_buffer_gather()
1320 log_telemetry_output(current_buffer->buffer, 0, current_buffer->current_position); in telemetry_buffer_gather()
1322 if ((result = copyout((void *)current_buffer->buffer, buffer + *length, in telemetry_buffer_gather()
1323 current_buffer->current_position)) != 0) { in telemetry_buffer_gather()
1327 *length += (uint32_t)current_buffer->current_position; in telemetry_buffer_gather()
1338 current_buffer->current_position, *length, in telemetry_buffer_gather()
1339 current_buffer->end_point, (&telemetry_buffer != current_buffer)); in telemetry_buffer_gather()