Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp4021196ioo; Wed, 25 May 2022 13:03:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoX6BpTrfvbYULMU9JC2VFKeMAbHdPV2ANsyCW1s2IuPMrjic+C8DqyhpTGjUWipCMkuV0 X-Received: by 2002:aa7:cdd2:0:b0:42b:aeb2:bc99 with SMTP id h18-20020aa7cdd2000000b0042baeb2bc99mr7324598edw.382.1653509035272; Wed, 25 May 2022 13:03:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653509035; cv=none; d=google.com; s=arc-20160816; b=Dnt0W9zUXgGY5oUf6LMY8U5954TGhgT7Ine5bhC7LbhVGOgPuxTKt2KRpbXF4uv2v2 otr8MCNSnxSIRA8I7Rekdjbcqc2uN+lqF+eifXDSrbZ00oNFbLzgO+7jLBetgbFExDAH xuhKzr22orxRhnpvupoGw4vV00NaWJ11/qwna1ryYeHTfYDmR8oL08e8r16H6ntj7USr 6DR3EbPvsE52xCBRDyjB+6WiC7oGXlP2lq8QScumlMWHSbq6zOuQjwxOl01aToqYPc/T klUM0BcwLL5uJ1TrYEhUN8RLIDGHBM9pq97X9S26SgsIWU2pKOhKT5SEXlztS5vIVwFj nxgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=H2El5rnJqNx/kdsRLFslyGd9XjsMWaGuNcwjEpVrQg4=; b=PERyMGcp8Mwl4Kd/fgjaADVdZp11L/IBIWUdqgXT48mc8N9JVYfGR3osPBOgLAMKLs YcI6PSSefoHK0NWNh9RkRDpftlqxh30iUGAcCwbuUvzXsXIySjkDaPQEAUN5dyrrQqp4 nrhdE+QhAR1el4VDcX0z27ajmpsi7YUipYTMe9BoR5pTubGzk2CKOxRW0dxEekBpBOlr JpnC6S0OiJgzDR1val3jl/aOUDcoJpk8WlIeJGPGfjlBcIXGztYf6D6neDiK+ABC3t8W MBxWaVLKFpyu2RoWANeTJM7R1vxoVaum/pDq7eaZUlnEyzN5cf3myxnzKz0hZAR0kT/w 0PmQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hp31-20020a1709073e1f00b006ff1420d58dsi2852341ejc.136.2022.05.25.13.03.28; Wed, 25 May 2022 13:03:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244688AbiEYOHX convert rfc822-to-8bit (ORCPT + 99 others); Wed, 25 May 2022 10:07:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245661AbiEYOF4 (ORCPT ); Wed, 25 May 2022 10:05:56 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C79609CCAC for ; Wed, 25 May 2022 07:05:30 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 539826190D for ; Wed, 25 May 2022 14:05:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F9D1C385B8; Wed, 25 May 2022 14:05:28 +0000 (UTC) Date: Wed, 25 May 2022 10:05:26 -0400 From: Steven Rostedt To: Jakub =?UTF-8?B?TWF0xJtuYQ==?= Cc: linux-mm@kvack.org, patches@lists.linux.dev, linux-kernel@vger.kernel.org, vbabka@suse.cz, mhocko@kernel.org, mgorman@techsingularity.net, willy@infradead.org, liam.howlett@oracle.com, hughd@google.com, kirill@shutemov.name, riel@surriel.com, peterz@infradead.org, david@redhat.com Subject: Re: [RFC PATCH v3 6/6] [PATCH 6/6] mm: add tracing for VMA merges Message-ID: <20220525100526.2a7a0eb7@gandalf.local.home> In-Reply-To: <20220516125405.1675-7-matenajakub@gmail.com> References: <20220516125405.1675-1-matenajakub@gmail.com> <20220516125405.1675-7-matenajakub@gmail.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 16 May 2022 14:54:05 +0200 Jakub Matěna 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) > + > +); > +