Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp485934lqp; Tue, 11 Jun 2024 09:58:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW85p263XosFEhqRVrapk8O3qsDZnbfP94/fbzDw+JYySHzdME8ct9toA54aNyWTPKO+d/64zGAzTdQVmZfNPoG63ihjNoYfDwIZui2BQ== X-Google-Smtp-Source: AGHT+IGJO/QqSDOoYtv2h5xe5rDCLXvTOiRYiUsy59MWTXqm+yk3KyoaEZmhyeCGosOnSYUv1w3K X-Received: by 2002:a05:6a21:33a1:b0:1b6:d8bd:c428 with SMTP id adf61e73a8af0-1b6d8bdfb7cmr7877873637.26.1718125080065; Tue, 11 Jun 2024 09:58:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718125080; cv=pass; d=google.com; s=arc-20160816; b=uFTlWhuRNHTAofmv+H5fTqdIkQdiJ+Hw+hwfqAOcQW4aTx9c4k1nloXc4FRgmsCh8J AxBY+Bk1ppYMqB60R1kHbc+Xnb5nm+ShVUCnGPPE/9MJDEHUUfzf2HEuI6tUOsUZfUXV rxGDXioysB/s8ChkW89/At9IOmp0WYIGNvY5HhYQWYjPEBXlk8eiOQ0Kg8bh/NBgS6GZ daEHooSxjijpfiVkzuJ44JbN0AKscrYvMH27F9nxvt92BudpFb6hVhtNbTLeYrT7CPC7 oS4JDjqOkkibtqdevX5+/a3RuekfH7G0We+2NpGIWu0NVb74hhFmSnJDaShMy2npwr+M iR3w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=JVYZypeuEYYxL7222DycAqXtsL4O3qOMN2CuecREqwI=; fh=Kbp5DTT7szasNZmb4ZyqR6R3Kh9mPgZGiNHZIGnXilk=; b=biQpchyrA69aHrH/6HyHPncQk1l2XyCLvFFAZc7379Y/Dy3F+pA90tu4EruRBXh64e I4Y0772wcp7cdlmatpQpjxLRZ2Dk2N1MDLq4AsXxTUIyV5UdlbHvIciibCpI6TEJoPSa Dsy6Me/cCO7/XdpKX3wh2YR7MbuKbsJvMuHWNs0P0nsdA29p0/cAIOyUPRTSAG0/5nHf FjdcKVvz37tA/YkIAdkUV4AVc0SNvMKD1M86u+GONckpjRrdfszlO2HFWFZmC37eczfG WOc6X0YvNkURLb+/UhY25fLDaRjwhsDHf827FeG+GS2KxFwi+YVT98Sl8foqXO1bzCiR /Jdw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-210296-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210296-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6f75c79f11asi1214733a12.452.2024.06.11.09.57.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 09:58:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210296-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-210296-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210296-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 89A6A28DCFF for ; Tue, 11 Jun 2024 16:57:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 139216E5ED; Tue, 11 Jun 2024 16:54:29 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 894853BBED; Tue, 11 Jun 2024 16:54:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718124868; cv=none; b=afRVQV6h3qyX8MwRhUSqIhLtngxmr6SJ5D96NKlFfuOylaQR7ojvDXQTBVxdGYZltfpNgtblO/uV9c+YIDTXg1uvCggE/b/DtOlq4a0C/Ay0ivkIHFrmqdjW/tSPI//OSwBzWpG60j58a2b98nFZfr24ui8SL7gGwxd8awqzKw8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718124868; c=relaxed/simple; bh=k1/dmpbynMnrbBscn/VmbNjjSCbrZOi5ZMoFxGslAcM=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=aSsa/U/gWR4dRLWZVStOUkVi6UGM7phEQwb7ZXZa20s4Q16+NmhXne5CX780yctOkARlswUgT6m/UobC/RwIcxWDkDIO+J1IZ9d2WXfW9dlRRqrWkDAVJyAPU15Dtbr94IFiqFQFrTKbQUG79JSifDWADF/kljIORks0wBkqSjU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D4A4C2BD10; Tue, 11 Jun 2024 16:54:25 +0000 (UTC) Date: Tue, 11 Jun 2024 12:54:40 -0400 From: Steven Rostedt To: Bart Van Assche Cc: Dongliang Cui , axboe@kernel.dk, mhiramat@kernel.org, mathieu.desnoyers@efficios.com, ebiggers@kernel.org, ke.wang@unisoc.com, hongyu.jin.cn@gmail.com, niuzhiguo84@gmail.com, hao_hao.wang@unisoc.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, akailash@google.com, cuidongliang390@gmail.com Subject: Re: [PATCH v4] block: Add ioprio to block_rq tracepoint Message-ID: <20240611125440.6d095270@gandalf.local.home> In-Reply-To: <86eb3dd0-77a1-4d1d-8e62-38c46bd7563a@acm.org> References: <20240611073519.323680-1-dongliang.cui@unisoc.com> <86eb3dd0-77a1-4d1d-8e62-38c46bd7563a@acm.org> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 11 Jun 2024 09:26:54 -0700 Bart Van Assche wrote: > On 6/11/24 12:35 AM, Dongliang Cui wrote: > > +#define IOPRIO_CLASS_STRINGS \ > > + { IOPRIO_CLASS_NONE, "none" }, \ > > + { IOPRIO_CLASS_RT, "rt" }, \ > > + { IOPRIO_CLASS_BE, "be" }, \ > > + { IOPRIO_CLASS_IDLE, "idle" }, \ > > + { IOPRIO_CLASS_INVALID, "invalid"} > > Shouldn't this array be defined in a C file instead of in a header file? The way the TRACE_EVENT() macro works, this will not work in a C file. > - TP_printk("%d,%d %s (%s) %llu + %u [%d]", > + TP_printk("%d,%d %s (%s) %llu + %u %s,%u,%u [%d]", > MAJOR(__entry->dev), MINOR(__entry->dev), > __entry->rwbs, __get_str(cmd), > - (unsigned long long)__entry->sector, > - __entry->nr_sector, 0) > + (unsigned long long)__entry->sector, __entry->nr_sector, > + __print_symbolic(IOPRIO_PRIO_CLASS(__entry->ioprio), > + IOPRIO_CLASS_STRINGS), > + IOPRIO_PRIO_HINT(__entry->ioprio), > + IOPRIO_PRIO_LEVEL(__entry->ioprio), 0) > ); > It's used for __print_symbolic() which the TRACE_EVENT() macro logic (using header files) will expand it to something useful. -- Steve