Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp510318lqp; Tue, 11 Jun 2024 10:38:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVcbumfPF4hmnxm5wMUiJggYMGKYuwXfMwwqg6G+1eqifys1aqOFGo5yxXsbIs8s6quDU6O9W2deuczCmwe5E/d0ydclBTvnoAb6Ys2yg== X-Google-Smtp-Source: AGHT+IG5SbUn1jHzhfOfG5qJizkFWbsN3xWYfhZz+CNvdKpTsOrGyvseWVnSLRsdsR/F8E1/TSZU X-Received: by 2002:a17:906:f90b:b0:a6f:1b:8e99 with SMTP id a640c23a62f3a-a6f001b9816mr617185866b.74.1718127480497; Tue, 11 Jun 2024 10:38:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718127480; cv=pass; d=google.com; s=arc-20160816; b=axNjjuDso5gLExcdR0GYAVoYFp56s7OA13WN5dKzyAVZ19B7mxfahc4IQYgxFlXoFf lW/h1SBXbQIcrBcEj6fqz+8YKKmCqzt+a/yXmUkx4AvCC3T0dyqMLkicZf5o7OmdcMlp SBDznQBsZ0Z3LcZWrcKkThfPAvOsOrYvBdiWT2YJlJAUFE9bnKquYPSQA2vpYNY/e8+m 5uIaaBkZdmSTN8qwkSBpOpS6LIoijoFhq5vxH1i5iG30wOeNbMqSVSmF4twO1j76LReg ELKl3rrmrT9Q+VFDMlSTLqGQQPvVrcQZD5nyI7GPMTj231aBeLPBto4ZOFgHUNNs/ZyQ BFNQ== 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=vRZ9q9fDyD/zL0O/RTd1qLpLJ2nDtScff0wzuCsQcq0=; fh=Kbp5DTT7szasNZmb4ZyqR6R3Kh9mPgZGiNHZIGnXilk=; b=KATaob/euuH+qZ2FdcdgfWaSb8xhcfe4gTelNtNvGmK5vuzENx6YbRJhFCtD1qhnVt q1lgc5MvO0Zx5/f1kujjTwTZcJx5AUAKFauq1BR+wSY/h4O7LLgTUIIvkJ6AUeok2fCl CB7w1XWAJM1T8oIKoX+4h9fXkmmcKs7YHH5N64PoyKEqZhZJe97ufopH8camOJfS2Dfb whc+qIrlWpSa1Wk1FMEgt9wtNxz28O0/EvfJ5ATLVGAe5Qyf2PSp8d81/ra5ij+Nsuc0 K76foGsrDxueOdRpRIBfLkkvCGVsIbOxyjALIgGGUvga/JrGK+Xr0i60ebYZENp0IcYK GuNQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-210335-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210335-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f14733893si288176166b.219.2024.06.11.10.38.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 10:38:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210335-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-210335-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210335-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 am.mirrors.kernel.org (Postfix) with ESMTPS id EDF811F248C5 for ; Tue, 11 Jun 2024 17:32:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 87FC34D8AF; Tue, 11 Jun 2024 17:32:01 +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 05F0029429; Tue, 11 Jun 2024 17:32:00 +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=1718127121; cv=none; b=YoJaJvspfVouqFLiY2YIgFRq6fC9e3IBEVFNgZHntMvXkKRPs04uvYe6tH/UVs7WF0MPFKNYnnexvzx1UenlUqD4PgJ5xmARAtrzY+tlGBSAa38UFdKTxBHHJRPLFNwHAVRmEeU5YdjYRH5azX24oL3ztLit6VJq6fSc5iqsows= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718127121; c=relaxed/simple; bh=CrNGOTYh6R/63u6KWmkKpoCdC3WNSHRNIBN1JbMpBPU=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=IOMtwtAMGlLTgoO7fkkFkGe8rMidosL6LF9hKPA2SUJRmWCNF6nRlW+ma+A+CUOcO1o6I03JMin4wliwTrW5Rb0jltrgi8/A2ci8wg8xkFaZkikysblqiMztM5LqyaX64JRhzfc33Bc42I+JbtyJNBg0Q5yfegNHVY03k6qZPhc= 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 27332C2BD10; Tue, 11 Jun 2024 17:31:59 +0000 (UTC) Date: Tue, 11 Jun 2024 13:32:14 -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: <20240611133214.3ab0c1a5@gandalf.local.home> In-Reply-To: <20240611131737.564b6655@gandalf.local.home> References: <20240611073519.323680-1-dongliang.cui@unisoc.com> <86eb3dd0-77a1-4d1d-8e62-38c46bd7563a@acm.org> <20240611125440.6d095270@gandalf.local.home> <20240611131737.564b6655@gandalf.local.home> 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 13:17:37 -0400 Steven Rostedt wrote: > > Hmm ... if the above array is terminated with a { -1, NULL } sentinel and if > > __print_symbolic() is changed into trace_print_symbols_seq(p, ...) then the above > > array can be moved into a C file, isn't it? > > > > Then it breaks user space parsing. The reason for __print_symbolic() is > that libtraceevent knows how to parse it. If you put the array into a C > file, the above mappings will not show up in the tracefs format file for > the event, and you'll just get "[FAILED TO PARSE]" output from the user > space tracing tooling. Note, the trace headers are not normal headers. They are included multiple times (when TRACE_HEADER_MULTI_READ is defined). Only one C file will include this header with CREATE_TRACE_POINTS defined and these headers will then build global C functions and variables. So technically, this "array" is in C file and not in a header, as it will not be created unless a C file includes it with CREATE_TRACE_POINTS, and only one C file may do that (otherwise the kernel will fail to build). -- Steve