Message ID | 157528174379.22451.7159526649325076423.stgit@devnote2 (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=a9JA=ZY=vger.kernel.org=linux-fsdevel-owner@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F19C3112B for <patchwork-linux-fsdevel@patchwork.kernel.org>; Mon, 2 Dec 2019 10:15:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D041C2464D for <patchwork-linux-fsdevel@patchwork.kernel.org>; Mon, 2 Dec 2019 10:15:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575281753; bh=hdYbB4vD+XKPDgul8kiAuaD8Mpa52ktV2BlgFHqJLuw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=HWsWXwD14cydktTdKd+CcozSOuBwk65WdQA2xjAt0uy1Sozk6A6JPgV7VtjAbK6T+ 4FFTOCmb07bjaQX5VUcDGUhtPTbhrzpkjX/VbuP736LVOzVPs0WCqNAIWPdZYNS4pi u334sPMxvUa+wSkKH9201lybTY2Dg7fLdsHuw/Qo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727681AbfLBKPu (ORCPT <rfc822;patchwork-linux-fsdevel@patchwork.kernel.org>); Mon, 2 Dec 2019 05:15:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:60764 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727354AbfLBKPu (ORCPT <rfc822;linux-fsdevel@vger.kernel.org>); Mon, 2 Dec 2019 05:15:50 -0500 Received: from localhost.localdomain (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EBC40215E5; Mon, 2 Dec 2019 10:15:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575281750; bh=hdYbB4vD+XKPDgul8kiAuaD8Mpa52ktV2BlgFHqJLuw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s18OkJB4LZEBAKa3XVdCFoX9sfhSkMX01oilYDEsvo3/seTgplmeSBmMTbR+AMI12 Tts69iVzvmfXldnnAZVcHx0LoW5GB+VetO9FIj/AdZZN8oBffiQ0HF8l6Xb4S//vDL zfc5xqmax4CQf/BuVt+uxghKkNLDIDK8xq1kXH4U= From: Masami Hiramatsu <mhiramat@kernel.org> To: Steven Rostedt <rostedt@goodmis.org>, Frank Rowand <frowand.list@gmail.com> Cc: Ingo Molnar <mingo@redhat.com>, Namhyung Kim <namhyung@kernel.org>, Tim Bird <Tim.Bird@sony.com>, Jiri Olsa <jolsa@redhat.com>, Arnaldo Carvalho de Melo <acme@kernel.org>, Tom Zanussi <tom.zanussi@linux.intel.com>, Rob Herring <robh+dt@kernel.org>, Andrew Morton <akpm@linux-foundation.org>, Thomas Gleixner <tglx@linutronix.de>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Alexey Dobriyan <adobriyan@gmail.com>, Jonathan Corbet <corbet@lwn.net>, Linus Torvalds <torvalds@linux-foundation.org>, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH v4 13/22] tracing: Accept different type for synthetic event fields Date: Mon, 2 Dec 2019 19:15:43 +0900 Message-Id: <157528174379.22451.7159526649325076423.stgit@devnote2> X-Mailer: git-send-email 2.20.1 In-Reply-To: <157528159833.22451.14878731055438721716.stgit@devnote2> References: <157528159833.22451.14878731055438721716.stgit@devnote2> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-fsdevel.vger.kernel.org> X-Mailing-List: linux-fsdevel@vger.kernel.org |
Series |
tracing: bootconfig: Boot-time tracing and Extra boot config
|
expand
|
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c index f49d1a36d3ae..06d91bb59297 100644 --- a/kernel/trace/trace_events_hist.c +++ b/kernel/trace/trace_events_hist.c @@ -4091,8 +4091,11 @@ static int check_synth_field(struct synth_event *event, field = event->fields[field_pos]; - if (strcmp(field->type, hist_field->type) != 0) - return -EINVAL; + if (strcmp(field->type, hist_field->type) != 0) { + if (field->size != hist_field->size || + field->is_signed != hist_field->is_signed) + return -EINVAL; + } return 0; }
Make the synthetic event accepts a different type field to record. However, the size and signed flag must be same. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> --- kernel/trace/trace_events_hist.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)