Skip to content

Commit

Permalink
parsers.
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanHenson committed Oct 27, 2023
1 parent 55ebb12 commit 7fe7aa2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/linux/system_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ size_t aws_get_cpu_count_for_group(uint16_t group_idx) {
AWS_ZERO_STRUCT(end_cursor);
if (aws_byte_cursor_next_split(&range_cursor, '-', &start_cursor) &&
aws_byte_cursor_next_split(&range_cursor, '-', &end_cursor)) {
uint64_t start, end;
AWS_LOGF_TRACE(AWS_LS_COMMON_GENERAL, "static: Parsed cpu ranges " PRInSTR "-" PRInSTR " for node %" PRIu16, AWS_BYTE_CURSOR_PRI(start_cursor), AWS_BYTE_CURSOR_PRI(end_cursor), group_idx);
uint64_t start, end;
if (aws_byte_cursor_utf8_parse_u64(start_cursor, &start) == AWS_OP_SUCCESS &&
aws_byte_cursor_utf8_parse_u64(end_cursor, &end) == AWS_OP_SUCCESS) {
cpu_count += (size_t)(end - start + 1);
Expand Down Expand Up @@ -322,9 +322,9 @@ void aws_get_cpu_ids_for_group(uint16_t group_idx, struct aws_cpu_info *cpu_ids_
if (aws_byte_cursor_next_split(&range_cursor, '-', &start_cursor) &&
aws_byte_cursor_next_split(&range_cursor, '-', &end_cursor)) {
uint64_t start, end;
AWS_LOGF_TRACE(AWS_LS_COMMON_GENERAL, "static: Parsed cpu ranges " PRInSTR "-" PRInSTR " for node %" PRIu16, AWS_BYTE_CURSOR_PRI(start_cursor), AWS_BYTE_CURSOR_PRI(end_cursor), group_idx);
if (aws_byte_cursor_utf8_parse_u64(start_cursor, &start) == AWS_OP_SUCCESS &&
aws_byte_cursor_utf8_parse_u64(end_cursor, &end) == AWS_OP_SUCCESS) {
AWS_LOGF_TRACE(AWS_LS_COMMON_GENERAL, "static: Parsed cpu ranges " PRInSTR "-" PRInSTR " for node %" PRIu16, AWS_BYTE_CURSOR_PRI(start_cursor), AWS_BYTE_CURSOR_PRI(end_cursor), group_idx);
for (uint64_t j = start; j <= end && cpu_count < cpu_ids_array_length; ++j) {
cpu_ids_array[cpu_count].cpu_id = (int32_t)j;
cpu_ids_array[cpu_count].suspected_hyper_thread = s_is_cpu_hyperthread((uint32_t)j);
Expand Down

0 comments on commit 7fe7aa2

Please sign in to comment.