From nobody Thu Apr 9 23:24:22 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 2D7141F4615 for ; Thu, 5 Mar 2026 08:09:15 +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=1772698159; cv=none; b=t22FTX435Sd3Rc3F/qaQrDJ4+wTAZ8f7qfVSXg4nlmPNKGzUBPZ/9ZXz5SFeK794MUhfkUvOYlzOhgGRkGBtV6yyWMd7ZXzElACPh7lK5qzpoPeepvflmyww8R1n2OWozAU5s0m26bdHFyKX8ThfMVyrq15n2XkVLcXE5dQ5FiM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772698159; c=relaxed/simple; bh=8zOumHZLb4yUjz4MAnDaIxx35XxJbcVHj20T3tfiIPk=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=L3i8IU4HIBLJsZT+vXB8KE0IdbHHJr82Ueviz8KUguU230ettcwDtgEUiutJ0i58zA3+i5iI0MlQporp9omFx/UkruLA+4N183rcNzHeoV1IzIrbHghW9GAa1WTvFxk8oceo55r7frfb5vq1PCQPxCpP1P9zmkWQG5Dz5FcN+To= 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=LiX0B3yX; 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="LiX0B3yX" Received: from dlp.unisoc.com ([10.29.3.86]) by SHSQR01.spreadtrum.com with ESMTP id 62588sMt092074; Thu, 5 Mar 2026 16:08:54 +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 4fRMbW19lhz2PBYg2; Thu, 5 Mar 2026 16:07:51 +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; Thu, 5 Mar 2026 16:08:52 +0800 From: Xuewen Yan To: , , , , CC: , , , , , , , , Subject: [RFC PATCH] tracing: Revert "tracing: Remove pid in task_rename tracing output" Date: Thu, 5 Mar 2026 16:08:09 +0800 Message-ID: <20260305080809.3245-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 62588sMt092074 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unisoc.com; s=default; t=1772698147; bh=tCiAwr0i8QW0sqKM2+nZCk9MOSzSpaH4AAu5VMaMrmE=; h=From:To:CC:Subject:Date; b=LiX0B3yXOGs+zB0IMECISm2npNSeK8YQlT1bY1tZMQMY14zbRqLF6jAftKe17MbdG txILOayRrG4ZmaZRUQ9aMTPlHOPFb5JJ+tplmjvLqzWK4KZv3ChXdcyzcfGp6o3j6f GzyBmdSD8/QmFfhrq54vCEs8MoqsTPB63LyM8dIYGamhgQ+lNdO9zXrjgs0Vkj+J0+ E7DrIS/PFwI17ZjRLnAevkhhl+o93Ei9Ynl05GdkdVC4lAlqo2FzO9sA2cM0A2Y8VY gy4u8oTuRLsWSbw695XRHyMCL0vRJ4LHDQODELIeHxWph5X/uxw4zMM0cZpTt84CxA kGGZmjWAli4ig== 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 set_task_comm __set_task_comm trace_task_rename 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) --- 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