Received: by 10.223.164.202 with SMTP id h10csp1626490wrb; Sat, 18 Nov 2017 02:58:12 -0800 (PST) X-Google-Smtp-Source: AGs4zMYiO/sozRPp3jEiXGNZa/J/5e4gtzjqwvqKO4PhrHhfRK3HPfG0w4oQ+nUQZXkuUbov2JYI X-Received: by 10.101.77.201 with SMTP id q9mr7796027pgt.226.1511002691974; Sat, 18 Nov 2017 02:58:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511002691; cv=none; d=google.com; s=arc-20160816; b=G0SxQxPcedui2YKA1Ne/lbpmS8KHa9VnVOCoeIzEwvxFqHxpdvNYhr8H0GFiibXX9V RvRHYQFRE75aMYthkPSUBpVH1g2N5QU+tNnk+v7ZNeMlEkQf/0LsSdNdCzBjYYJlRb/S HqmvKiYi41K7ef6f+F9dCm2sKuAoYwxGZ+g41kIGL6W4yFnCtKZijMab5JqVSl1RsEC+ IpSPep3HVU+hsyxrOXVp7ZNk/SBJpLmSM0bxRhjF63Z+EFfF1UAphG+PBMNaaZbTToh3 +f0tRXBJNZy6YJ2InmnI3dLzRiEU2HwG+0JJZD/GN0vrSUOrEhrZq0enasvGNu4B9JGZ hhgQ== 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=BJggffRa9AZ840EqtZzBxQBXt7rMDhuY7p/BUUnvye8=; b=UZJR4BhsYY9lOHKULCWfgFmqZ55uWElihShNAZoLEOjCbrojnHU9meb/1y8Tumc/0w rVYwSqQV+2fl5jzSrm8rBAJaGzSlUotyEnmfcYkUh/M44e0eCkoqinShI8ZqAqZ1lLva NT/PQjKxXG2aGnmIGkr+y5JT+9mxLo3PyPn+2tmgQ0IgyfnQIAc4f7IMzieMS/a108Vu 7ypUdCEdkov0hNemK2sg1BWjCTWaMDnz6GnxMbc29siNuNaVZ57BvbNSFX7OqV7/ed8u dcW+r3Ue7U/XzN+w+hPpQYUU/ovht94zXVScXbyOyftJIITFWo3yuHqfLfzNkjxag0PU phgw== 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 i134si4325633pgc.583.2017.11.18.02.57.59; Sat, 18 Nov 2017 02:58:11 -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 S966610AbdKQUkn (ORCPT + 93 others); Fri, 17 Nov 2017 15:40:43 -0500 Received: from mga09.intel.com ([134.134.136.24]:47027 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935100AbdKQUe6 (ORCPT ); Fri, 17 Nov 2017 15:34:58 -0500 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Nov 2017 12:34:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,411,1505804400"; d="scan'208";a="1245396472" Received: from mjglynn-mobl.ger.corp.intel.com (HELO localhost) ([10.254.124.112]) by fmsmga002.fm.intel.com with ESMTP; 17 Nov 2017 12:34:36 -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, fengguang.wu@intel.com, linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org, Tom Zanussi Subject: [PATCH v6 16/37] tracing: Account for variables in named trigger compatibility Date: Fri, 17 Nov 2017 14:32:55 -0600 Message-Id: <442588bc3313b23792fe0258ec88f7e69096c188.1510948725.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 eccfe07..0e4f829 100644 --- a/kernel/trace/trace_events_hist.c +++ b/kernel/trace/trace_events_hist.c @@ -1610,7 +1610,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) @@ -1798,6 +1798,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 1584888450963149668@xxx Thu Nov 23 20:03:30 +0000 2017 X-GM-THRID: 1584888450963149668 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread