lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220525100526.2a7a0eb7@gandalf.local.home>
Date:   Wed, 25 May 2022 10:05:26 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Jakub Matěna <matenajakub@...il.com>
Cc:     linux-mm@...ck.org, patches@...ts.linux.dev,
        linux-kernel@...r.kernel.org, vbabka@...e.cz, mhocko@...nel.org,
        mgorman@...hsingularity.net, willy@...radead.org,
        liam.howlett@...cle.com, hughd@...gle.com, kirill@...temov.name,
        riel@...riel.com, peterz@...radead.org, david@...hat.com
Subject: Re: [RFC PATCH v3 6/6] [PATCH 6/6] mm: add tracing for VMA merges

On Mon, 16 May 2022 14:54:05 +0200
Jakub Matěna <matenajakub@...il.com> wrote:

> +	TP_fast_assign(
> +		__entry->merged = merged == 0;
> +		__entry->predecessor_different_av = merge_prev;
> +		__entry->successor_different_av = merge_next;
> +		__entry->predecessor_with_successor_different_av = merge_both;


> +		__entry->same_count = (merge_prev == AV_MERGE_SAME) +
> +			(merge_next == AV_MERGE_SAME) +
> +			(merge_both == AV_MERGE_SAME);
> +		__entry->diff_count = (merge_prev == AV_MERGE_DIFFERENT) +
> +			(merge_next == AV_MERGE_DIFFERENT) +
> +			(merge_both == AV_MERGE_DIFFERENT);
> +		__entry->failed_count = (merge_prev == AV_MERGE_FAILED) +
> +			(merge_next == AV_MERGE_FAILED) +
> +			(merge_both == AV_MERGE_FAILED);

The above looks like it can be moved into the TP_printk(), as you have the
merge_prev, next and both saved already. Why waste more ring buffer space
and execution time for information that can be derived at the time of
reading the trace event?

-- Steve


> +	),
> +
> +	TP_printk("merged=%d predecessor=%s successor=%s predecessor_with_successor=%s same_count=%d diff_count=%d failed_count=%d",
> +		__entry->merged,
> +		__print_symbolic(__entry->predecessor_different_av, AV_MERGE_TYPES),
> +		__print_symbolic(__entry->successor_different_av, AV_MERGE_TYPES),
> +		__print_symbolic(__entry->predecessor_with_successor_different_av, AV_MERGE_TYPES),
> +		__entry->same_count, __entry->diff_count, __entry->failed_count)
> +
> +);
> +

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ