Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1739782ybg; Sat, 19 Oct 2019 01:28:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJiILYjUlcOMG0Hiis6q4NqAvfnEk8ikJBbNcZ2OqKr/9w4RGn7MGdKoMfy0PPKA9xG+MH X-Received: by 2002:a17:906:54cf:: with SMTP id c15mr12648730ejp.202.1571473695858; Sat, 19 Oct 2019 01:28:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571473695; cv=none; d=google.com; s=arc-20160816; b=N290aV/D6ES4yFipcmfSjtq4JdIfPcflS1p+9umzvjCHV/RMf6jAEArl+WcNH7c5qj 2ezzO7TkVxMe8zbpAG+cHd8gv/4rcJFkoa26ZTX98LOcIax5vnavYCt0bNvb3xwviQI7 X2dmWz9mxAVJ0/JB6gYMo7cRU7VDxVU9tq7rtoOAZH1Z+7S5R4z2eYRSgm5iCctcWDiH amregO+JK+aTYhEhJiDwQJ3e9PVXceXFt2jhPTTjFu5TnWWwZDGaNB2woOx+rPj5b8d+ 8lcRpmDbePvZEs6uLKCVoyN4k/9PlZ/TuLZJkdJr60roW9eNqarnkR73bMIxzjwtCzay XfWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=OuuDTTrT7WN/tRyvElSOD0+8IwyzWnLJWzUtR1i2Wow=; b=08UN9l8911Zf16DsTW6ovCAWLg9che9HaiIVKSbNqHwjZiPAN0bkLWEmF5T/7Cc8PG YQ/DIDS1/+8/ANxUz33v3CLPFLYsSdn8IX4PZ/UxqXeeBHm9szv6nYMF6KAyZ/m4owIK agWyshtYtepCQQPaTwuY5/1Ulna1W7YxEW4w+6kIfphIN46oF0oyEaghxA+yVfmNfz1J it61VM3hHsNXMLSmv9fwq3N5eCVphXQSWtVMkzmXbx8Rp23VtXtxaU8cuqhE1QrxlNx0 nXFGKa6wod8wBivqlt6tyKvo/isPXadeiK37Py9A9NxaGmjqlF2Snw9sMKrVO/CYT7LM kGDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d2si4772113ejk.301.2019.10.19.01.27.53; Sat, 19 Oct 2019 01:28:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2634136AbfJROOk (ORCPT + 99 others); Fri, 18 Oct 2019 10:14:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:59466 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2633946AbfJROOk (ORCPT ); Fri, 18 Oct 2019 10:14:40 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 546C921925; Fri, 18 Oct 2019 14:14:39 +0000 (UTC) Date: Fri, 18 Oct 2019 10:14:38 -0400 From: Steven Rostedt To: Zhengjun Xing Cc: mingo@redhat.com, tom.zanussi@linux.intel.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] tracing: fix "gfp_t" format for synthetic events Message-ID: <20191018101438.6cc4a25c@gandalf.local.home> In-Reply-To: <20191018012034.6404-1-zhengjun.xing@linux.intel.com> References: <20191018012034.6404-1-zhengjun.xing@linux.intel.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 18 Oct 2019 09:20:34 +0800 Zhengjun Xing wrote: > In the format of synthetic events, the "gfp_t" is shown as "signed:1", > but in fact the "gfp_t" is "unsigned", should be shown as "signed:0". > > The issue can be reproduced by the following commands: > > echo 'memlatency u64 lat; unsigned int order; gfp_t gfp_flags; int migratetype' > /sys/kernel/debug/tracing/synthetic_events > cat /sys/kernel/debug/tracing/events/synthetic/memlatency/format > > name: memlatency > ID: 2233 > format: > field:unsigned short common_type; offset:0; size:2; signed:0; > field:unsigned char common_flags; offset:2; size:1; signed:0; > field:unsigned char common_preempt_count; offset:3; size:1; signed:0; > field:int common_pid; offset:4; size:4; signed:1; > > field:u64 lat; offset:8; size:8; signed:0; > field:unsigned int order; offset:16; size:4; signed:0; > field:gfp_t gfp_flags; offset:24; size:4; signed:1; > field:int migratetype; offset:32; size:4; signed:1; > > print fmt: "lat=%llu, order=%u, gfp_flags=%x, migratetype=%d", REC->lat, REC->order, REC->gfp_flags, REC->migratetype > Tom, Can you give a Reviewed-by for this? -- Steve > Signed-off-by: Zhengjun Xing > --- > kernel/trace/trace_events_hist.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c > index 57648c5aa679..7482a1466ebf 100644 > --- a/kernel/trace/trace_events_hist.c > +++ b/kernel/trace/trace_events_hist.c > @@ -679,6 +679,8 @@ static bool synth_field_signed(char *type) > { > if (str_has_prefix(type, "u")) > return false; > + if (strcmp(type, "gfp_t") == 0) > + return false; > > return true; > }