Received: by 10.223.164.202 with SMTP id h10csp681088wrb; Thu, 9 Nov 2017 12:36:29 -0800 (PST) X-Google-Smtp-Source: ABhQp+Su+yD5jITk3uUaiZkqiTYSLUwK7ajbeU9zEbELTfhm3gyJaBZdVCufHU73puOVDX8m2ASC X-Received: by 10.159.250.132 with SMTP id k4mr1558097pls.61.1510259789682; Thu, 09 Nov 2017 12:36:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510259789; cv=none; d=google.com; s=arc-20160816; b=q7igNFlGcOJrMq72XWD2VpEYyzHULdbTFdtVZstLZvRsGFLny++RHG/kPWwWyI/dHk 84aICGu1NjSgwvbcIahn+dOCjpugn4kEbmLGizjW/nZBDEDCFyokZF+dDHyis1P0dpKX +WBUVFAEe9SzI19XBfEbDCyA5bKUzEmmjTGXQmKvfOS483ZkBtFeVCOlgnsYjd8rCIQP fOpfqtTuMkwSY6WZ1bPAJC4uNTfG4WJP/V8GR4iIclCTYjUSahNQkz/7Bzoq3e7i8l1S 8XHM3Meglajhsolqsjlnpr6OKswhN8LKg6hnz5dxXQ/U4Ek5FMVzRqrBvq1Jzm6M+Zp9 BweA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=D3QxwVB6ZQ9BTMY650d85/A7hZjUM6aOVAA8rEmjYF8=; b=HDAqum1mVP9qL9k5zOCp2xAqt2MCsJqPPhDFpfcxsMqlKLRxW80S5R4WTzc3U3reB+ HlDmZTNo8DLG6W0V+OWLpzLB95k8PIW7iwndmr5kdIbIEbPOXS0Gi4LgOpiUhiAsyaBY +GgFrZyLYPF8LMPdX5Mh/9lUzD+5LrZ2387SqHtN746l7JexoSogXv/CoJIh1R/q+MJw mpsl9/RNb6K1Su2B3l4XSv7rk1y/xnZlE8rfrj0JBdd9h01jQzGZ9gZSvI+6Cwc9UOx/ rBttvOZ5ebYUO0b6HlIeurlYCoDcmHEHJx2UbO6NB9CZvU4jusHptsWzXJqM6NLxfSKG X2gA== 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 p25si7111962pgn.126.2017.11.09.12.36.18; Thu, 09 Nov 2017 12:36:29 -0800 (PST) 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 S1754854AbdKIUfJ (ORCPT + 83 others); Thu, 9 Nov 2017 15:35:09 -0500 Received: from mga05.intel.com ([192.55.52.43]:5001 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754597AbdKIUfF (ORCPT ); Thu, 9 Nov 2017 15:35:05 -0500 Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP; 09 Nov 2017 12:35:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,370,1505804400"; d="scan'208";a="171788388" Received: from dkusalov-mobl4.amr.corp.intel.com (HELO localhost) ([10.254.117.34]) by orsmga005.jf.intel.com with ESMTP; 09 Nov 2017 12:35:03 -0800 From: Tom Zanussi To: rostedt@goodmis.org Cc: tglx@linutronix.de, mhiramat@kernel.org, namhyung@kernel.org, vedang.patel@intel.com, bigeasy@linutronix.de, joel.opensrc@gmail.com, joelaf@google.com, mathieu.desnoyers@efficios.com, baohong.liu@intel.com, rajvi.jingar@intel.com, julia@ni.com, linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org, Tom Zanussi Subject: [PATCH v5 16/37] tracing: Account for variables in named trigger compatibility Date: Thu, 9 Nov 2017 14:33:47 -0600 Message-Id: <5115e10d52fda1f2ae443badeac901260b827182.1510252666.git.tom.zanussi@linux.intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Named triggers must also have the same set of variables in order to be considered compatible - update the trigger match test to account for that. The reason for this requirement is that named triggers with variables are meant to allow one or more events to set the same variable. Signed-off-by: Tom Zanussi --- kernel/trace/trace_events_hist.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c index a7eb162..24a2b69 100644 --- a/kernel/trace/trace_events_hist.c +++ b/kernel/trace/trace_events_hist.c @@ -1605,7 +1605,7 @@ static int event_hist_trigger_print(struct seq_file *m, sort_key = &hist_data->sort_keys[i]; idx = sort_key->field_idx; - if (WARN_ON(idx >= TRACING_MAP_FIELDS_MAX)) + if (WARN_ON(idx >= HIST_FIELDS_MAX)) return -EINVAL; if (i > 0) @@ -1793,6 +1793,11 @@ static bool hist_trigger_match(struct event_trigger_data *data, return false; if (key_field->is_signed != key_field_test->is_signed) return false; + if (!!key_field->var.name != !!key_field_test->var.name) + return false; + if (key_field->var.name && + strcmp(key_field->var.name, key_field_test->var.name) != 0) + return false; } for (i = 0; i < hist_data->n_sort_keys; i++) { -- 1.9.3 From 1583622747295743993@xxx Thu Nov 09 20:45:40 +0000 2017 X-GM-THRID: 1583622747295743993 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread