From nobody Thu Apr 9 19:32:08 2026 Received: from SHSQR01.spreadtrum.com (mx1.unisoc.com [222.66.158.135]) (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 68AD431AA94 for ; Fri, 6 Mar 2026 08:00:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=222.66.158.135 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772784057; cv=none; b=jBVK3/3S/2voX2WdyDpylXdvzctpFS+4DqQiQo8la1DHzda94XjqbtSjV7Kez5aoj0uDgP2f6+xXZ+AtJD9KaWvJQ8kAXKN5pQVaK4MEhoZzpA+kOKmbtjQpcRtVQmh8Hrm8bdpu4reaWNw47mhmF6WP7tChWX59/7DuKW04mrU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772784057; c=relaxed/simple; bh=r86bYWmgJvYIJixbP6qjPCwoNkmdAiOFFtwK5AChiCY=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=B5Y71EGmcdKyubghX+PvBVpVptP24W9xQzz/n5Z0hJkLP8Bex37En+epBevVpb4esM89Ck5dz+S73mTboXBzq01L010jHsJWeHDBa92tdtlMG0mgtyPczmqGSFujKun7tNWt8wTsWJu15tlwl24br2874KhmYC5x67uX19L8p3A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=unisoc.com; spf=pass smtp.mailfrom=unisoc.com; dkim=pass (2048-bit key) header.d=unisoc.com header.i=@unisoc.com header.b=B8wtgnUU; arc=none smtp.client-ip=222.66.158.135 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=unisoc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=unisoc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=unisoc.com header.i=@unisoc.com header.b="B8wtgnUU" Received: from dlp.unisoc.com ([10.29.3.86]) by SHSQR01.spreadtrum.com with ESMTP id 62680Evf077596; Fri, 6 Mar 2026 16:00:14 +0800 (+08) (envelope-from Xuewen.Yan@unisoc.com) Received: from SHDLP.spreadtrum.com (BJMBX01.spreadtrum.com [10.0.64.7]) by dlp.unisoc.com (SkyGuard) with ESMTPS id 4fRzM064CSz2NK5vR; Fri, 6 Mar 2026 15:59:08 +0800 (CST) Received: from BJ10918NBW01.spreadtrum.com (10.0.73.73) by BJMBX01.spreadtrum.com (10.0.64.7) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Fri, 6 Mar 2026 16:00:11 +0800 From: Xuewen Yan To: , , , , CC: , , , , , , , , , Subject: [PATCH V2] tracing: Revert "tracing: Remove pid in task_rename tracing output" Date: Fri, 6 Mar 2026 15:59:54 +0800 Message-ID: <20260306075954.4533-1-xuewen.yan@unisoc.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To BJMBX01.spreadtrum.com (10.0.64.7) X-MAIL: SHSQR01.spreadtrum.com 62680Evf077596 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unisoc.com; s=default; t=1772784041; bh=GNpRpMauuj7gFsNQV7OtGtgexum9Eop40z9zrHZikbk=; h=From:To:CC:Subject:Date; b=B8wtgnUUP6i1nV5h/Nj+Xh0dwwq4OjaS59ApqA906N3mMwcY8xqjJzMkvVozVPocv UQdKZ0QO4nBOkT3+iRm64A4Ytenh40QpkMoOiuPwaykabo6k+wkB9OgQbCIWB74+a8 o2LuNBZJzWF4lPU/VMK2oYsyAZ9R6LMG2zVM0GCOlQl4+/6BnY8KM+bEICo8ZBMqnL Y+ZMEHt4GnBtWMT7J6AwtmRZ090z1aszrwNV7Jk3Wexk8quFjc/me/aEys93iIscUW Kpxs/l4eEgoJEnRNHq00FGQ6eEvm3TJ9X7qJFqrDwuqF++l+rEHnpuLVwbo4Fj2qD5 g0vTf08/JJZfA== Content-Type: text/plain; charset="utf-8" This reverts commit e3f6a42272e028c46695acc83fc7d7c42f2750ad. The commit says that the tracepoint only deals with the current task, however the following case is not current task: comm_write() { p =3D get_proc_task(inode); if (!p) return -ESRCH; if (same_thread_group(current, p)) set_task_comm(p, buffer); } where set_task_comm() calls __set_task_comm() which records the update of p and not current. So revert the patch to show pid. Fixes: e3f6a42272e0 ("tracing: Remove pid in task_rename tracing output") Reported-by: Guohua Yan Signed-off-by: Xuewen Yan Reviewed-by: Steven Rostedt (Google) --- v2: - update commit message (Steven) --- include/trace/events/task.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/trace/events/task.h b/include/trace/events/task.h index 4f0759634306..b9a129eb54d9 100644 --- a/include/trace/events/task.h +++ b/include/trace/events/task.h @@ -38,19 +38,22 @@ TRACE_EVENT(task_rename, TP_ARGS(task, comm), =20 TP_STRUCT__entry( + __field( pid_t, pid) __array( char, oldcomm, TASK_COMM_LEN) __array( char, newcomm, TASK_COMM_LEN) __field( short, oom_score_adj) ), =20 TP_fast_assign( + __entry->pid =3D task->pid; memcpy(entry->oldcomm, task->comm, TASK_COMM_LEN); strscpy(entry->newcomm, comm, TASK_COMM_LEN); __entry->oom_score_adj =3D task->signal->oom_score_adj; ), =20 - TP_printk("oldcomm=3D%s newcomm=3D%s oom_score_adj=3D%hd", - __entry->oldcomm, __entry->newcomm, __entry->oom_score_adj) + TP_printk("pid=3D%d oldcomm=3D%s newcomm=3D%s oom_score_adj=3D%hd", + __entry->pid, __entry->oldcomm, + __entry->newcomm, __entry->oom_score_adj) ); =20 /** --=20 2.25.1