On Mon, 30 Mar 2026 21:50:04 +0900
"Masami Hiramatsu (Google)" <[email protected]> wrote:

> @@ -2042,7 +2065,8 @@ static void rb_meta_validate_events(struct 
> ring_buffer_per_cpu *cpu_buffer)
>       local_set(&cpu_buffer->entries, entries);
>       local_set(&cpu_buffer->entries_bytes, entry_bytes);
>  
> -     pr_info("Ring buffer meta [%d] is from previous boot!\n", 
> cpu_buffer->cpu);
> +     pr_info("Ring buffer meta [%d] is from previous boot! (%d pages 
> discarded)\n",
> +             cpu_buffer->cpu, discarded);

As pages should never be discarded unless something went wrong, let's only
print that if there were discarded pages.

        if (discarded) {
                pr_info("Ring buffer meta [%d] is from previous boot! (%d pages 
discarded)\n",
                        cpu_buffer->cpu, discarded);
        } else {
                pr_info("Ring buffer meta [%d] is from previous boot!\n", 
cpu_buffer->cpu);
        }

-- Steve




>       return;
>  
>   invalid:

Reply via email to