From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-184.mta0.migadu.com (out-184.mta0.migadu.com [91.218.175.184]) (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 C29E312FB18 for ; Fri, 19 Apr 2024 15:47:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.184 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713541637; cv=none; b=kfdZ2h3dYTtVEFJf33Slo7OWdUbnSOJBHDNYNIjhqZvIXdGBAi8nW1ccYd5VisCNH2dD6V/q6G7VtvxG1qguh7kpsGnlIbpjIjsrt+NKhEnI+J5A8cf82IVPfzKRSy43kB1T32mDmwM7EfV56tYe+3vvVjbBu5rzSDmqGkVoIxE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713541637; c=relaxed/simple; bh=Ighm23j8LkVYC+wsxxPfVCbc4FMTNLhJsp7jD2WmR+I=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=NOMgBpJFXjrwhSUJ2+AbtO8wfvBtxO6s/Pr5eqO02mc6pJrRpJnjSgeWV+st6ByWqlo/Wf1T6Soo1wcYbt/tKO71LdeFsfPmQcva+KrN6fYNK96jean8LXU/7X9X8+L9LpTLnOOnONMaMjAGpH5KEUj1dzeG5MrYEQ/wDlPz5wg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=BSKlMVg6; arc=none smtp.client-ip=91.218.175.184 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="BSKlMVg6" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1713541632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OFj78g7lgpNWf+bXW61uPptpVivxmo4eSRSsOflqKx0=; b=BSKlMVg6gkPimTnnGKP9hm0UlK1sX78CBEqo9TvwGGvk1hb33NK38dBOggi4Vl7ka17eS3 PxLYj2UDC2UYEOv8vOJC6XO/q61MleDkeegdZHFSA7nBVq2hU16c4KiX+PeS0KukdB+4uR EUnGLsCJC+WvxDhJkWk8AMfGR6KdeHs= From: George Guo To: gregkh@linuxfoundation.org, tom.zanussi@linux.intel.com Cc: stable@vger.kernel.org, Namhyung Kim , Masami Hiramatsu , Steven Rostedt , George Guo Subject: [PATCH 4.19.y v6 1/2] tracing: Remove hist trigger synth_var_refs Date: Fri, 19 Apr 2024 23:46:57 +0800 Message-Id: <20240419154658.4015260-2-dongtai.guo@linux.dev> In-Reply-To: <20240419154658.4015260-1-dongtai.guo@linux.dev> References: <20240419154658.4015260-1-dongtai.guo@linux.dev> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT From: Tom Zanussi commit 912201345f7c39e6b0ac283207be2b6641fa47b9 upstream. All var_refs are now handled uniformly and there's no reason to treat the synth_refs in a special way now, so remove them and associated functions. Link: http://lkml.kernel.org/r/b4d3470526b8f0426dcec125399dad9ad9b8589d.1545161087.git.tom.zanussi@linux.intel.com Acked-by: Namhyung Kim Reviewed-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) Signed-off-by: George Guo --- kernel/trace/trace_events_hist.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c index e004daf8cad5..e4f5b6894cf2 100644 --- a/kernel/trace/trace_events_hist.c +++ b/kernel/trace/trace_events_hist.c @@ -280,8 +280,6 @@ struct hist_trigger_data { struct action_data *actions[HIST_ACTIONS_MAX]; unsigned int n_actions; - struct hist_field *synth_var_refs[SYNTH_FIELDS_MAX]; - unsigned int n_synth_var_refs; struct field_var *field_vars[SYNTH_FIELDS_MAX]; unsigned int n_field_vars; unsigned int n_field_var_str; @@ -3708,20 +3706,6 @@ static void save_field_var(struct hist_trigger_data *hist_data, } -static void destroy_synth_var_refs(struct hist_trigger_data *hist_data) -{ - unsigned int i; - - for (i = 0; i < hist_data->n_synth_var_refs; i++) - destroy_hist_field(hist_data->synth_var_refs[i], 0); -} - -static void save_synth_var_ref(struct hist_trigger_data *hist_data, - struct hist_field *var_ref) -{ - hist_data->synth_var_refs[hist_data->n_synth_var_refs++] = var_ref; -} - static int check_synth_field(struct synth_event *event, struct hist_field *hist_field, unsigned int field_pos) @@ -3884,7 +3868,6 @@ static int onmatch_create(struct hist_trigger_data *hist_data, goto err; } - save_synth_var_ref(hist_data, var_ref); field_pos++; kfree(p); continue; @@ -4631,7 +4614,6 @@ static void destroy_hist_data(struct hist_trigger_data *hist_data) destroy_actions(hist_data); destroy_field_vars(hist_data); destroy_field_var_hists(hist_data); - destroy_synth_var_refs(hist_data); kfree(hist_data); } -- 2.34.1