Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp520460lqb; Wed, 17 Apr 2024 03:33:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXULhYzMZBHWk1Mbd12x1vL9/osOcWjLaZEOp6PedoKR6zoiZ1C1En8N2OSZ5qcm4Tj5GkS6bAaCkPt+JYHdD7HjDWqzy2ia9Dt3cWmwA== X-Google-Smtp-Source: AGHT+IGgCpP2Ilkoi1u8K/kGzbgZRhy6zlGM2H3ucQh3toCtOnmkUOw+KmI/Tz1vzoPIt1gezSJB X-Received: by 2002:a05:6a21:2d8d:b0:1aa:220a:d2bc with SMTP id ty13-20020a056a212d8d00b001aa220ad2bcmr8129595pzb.5.1713349999487; Wed, 17 Apr 2024 03:33:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713349999; cv=pass; d=google.com; s=arc-20160816; b=iOTimZp5COejuYIXZWTjN1agVgwppN4xI/ZbGRgn8K5BpJw7iJHfPQlkUgQP4fhYxS 2jGEY8cGIaNDNMNKcgsJFAjp+I8FB3X8GN2XJ0XUGYAyhf7amtsmCL3RHEfXv2/0Pfwv gzsVFDsdYTfFI1LpQfccxlqEFAiU2z2WwYeYiDy7v3ASX5sVsd8PLcnewT99QAkQA4C+ 6jY+Mut7x/ZOhF1n4SHhkAC0CzkutgOkjZEB4mD8e+yv8/g6SSR1oIQG1oM5vaEvpmzb kkbi2q8SHG0z7FFBun2il108/KVS6f2ZirV4JL6jlLIwt047QG49F8LVXv8VXD001wWr rYLQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:mail-followup-to:message-id :subject:cc:to:from:date; bh=yR10jhB7JQxOWV6JSef7akVuBfQII3kq3RsipagoUoY=; fh=Ot2dFqfzFXlI7MXcKdJHUI0J8w6mGcaUQyHNbRUuVlQ=; b=lf4F9yW0vkgCOvIsTO+JrhKlnjHanSMiUPF3Eta8hkJe5tigXdbid2dt4mp+/S5MgH R5McnulbPsLIZ0Smx767sAvV+ow7Icz84+w6yPjqNMx5FAtJ0mClP+vfNPRsp+EXENlH 8Gf9r5Fp/Fa6aWjpk6M2HZAj7bwsEqMrnKWWH2uVQn8jAgB9UJBNrIR+5R2TH6P1tlsC kQCspfHzfMZyjnh0yDPnTFhxmRDJi4tsnWtNwGVPAgXt8RH+fi49SQm8f1REJYxNG82D Bo5Fr5ZPjrmiW8NYrWSPio91d17e1aNJXvHlvGnmHDVhxB9ZD8U9gqmoKEBDK0CEBpYQ wa7w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=didiglobal.com dmarc=pass fromdomain=didiglobal.com); spf=pass (google.com: domain of linux-kernel+bounces-148329-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148329-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=didiglobal.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id r11-20020aa7988b000000b006ea87453d4asi11338973pfl.222.2024.04.17.03.33.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 03:33:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-148329-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=didiglobal.com dmarc=pass fromdomain=didiglobal.com); spf=pass (google.com: domain of linux-kernel+bounces-148329-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148329-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=didiglobal.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D45D7283E63 for ; Wed, 17 Apr 2024 10:32:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4EA951327E0; Wed, 17 Apr 2024 10:32:21 +0000 (UTC) Received: from mx10.didiglobal.com (mx10.didiglobal.com [111.202.70.125]) by smtp.subspace.kernel.org (Postfix) with SMTP id 45A9813173A for ; Wed, 17 Apr 2024 10:32:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=111.202.70.125 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713349940; cv=none; b=U/n2DSRfOSq2IOvImFKVMpSA095T92OihupdlMafMkgb3FDp50PaHLALfHnGtfrf4HHNENTg4AmiHTqd76xEFC+VL8A+7S433b5AKHLc/WT/PagoN/DapEjmh5MREAOb6FHbDpCqCOeUqTFM7yZlQ7iZgWyYEqiYZqyu4SWcD3o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713349940; c=relaxed/simple; bh=hH1V+AE+YWCRoqcKWjtd8ekK6h5iWxEK1lCPmP0C6lQ=; h=Date:From:To:CC:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=P2NDFbFkQe7amK+9n9l3U6NId3KAk8TKsdA26xBQWTd4ymWwTjqu1UAjaUtX9vBhSU9/V6PpyDr6mb/7L1amVbxMFa3p0msxMXLXPs5a8Xzm1ZvmFw+itqI3HQIEylLrRJn66bXailwhDF1BN6qYlgOvnqz+UuqBQa3s3xiwqSw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=didiglobal.com; spf=pass smtp.mailfrom=didiglobal.com; arc=none smtp.client-ip=111.202.70.125 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=didiglobal.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=didiglobal.com Received: from mail.didiglobal.com (unknown [10.79.65.12]) by mx10.didiglobal.com (MailData Gateway V2.8.8) with ESMTPS id 5EAD3183A913F8; Wed, 17 Apr 2024 18:29:06 +0800 (CST) Received: from didi-ThinkCentre-M930t-N000 (10.79.64.101) by ZJY02-ACTMBX-02.didichuxing.com (10.79.65.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 17 Apr 2024 18:29:06 +0800 Date: Wed, 17 Apr 2024 18:29:00 +0800 X-MD-Sfrom: tiozhang@didiglobal.com X-MD-SrcIP: 10.79.65.12 From: Tio Zhang To: , CC: , , , , , Subject: [PATCH 1/1] tracing/sched: sched_switch: place prev_comm and next_comm in right order Message-ID: <20240417102840.GA6614@didi-ThinkCentre-M930t-N000> Mail-Followup-To: rostedt@goodmis.org, mhiramat@kernel.org, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, mathieu.desnoyers@efficios.com, zyhtheonly@gmail.com, zyhtheonly@yeah.net Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-ClientProxiedBy: ZJY01-PUBMBX-01.didichuxing.com (10.79.64.32) To ZJY02-ACTMBX-02.didichuxing.com (10.79.65.12) Switch the order of prev_comm and next_comm in sched_switch's code to align with its printing order. Signed-off-by: Tio Zhang --- include/trace/events/sched.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index dbb01b4b7451..a4bd4330db4c 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h @@ -239,11 +239,11 @@ TRACE_EVENT(sched_switch, ), TP_fast_assign( - memcpy(__entry->next_comm, next->comm, TASK_COMM_LEN); + memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN); __entry->prev_pid = prev->pid; __entry->prev_prio = prev->prio; __entry->prev_state = __trace_sched_switch_state(preempt, prev_state, prev); - memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN); + memcpy(__entry->next_comm, next->comm, TASK_COMM_LEN); __entry->next_pid = next->pid; __entry->next_prio = next->prio; /* XXX SCHED_DEADLINE */ -- 2.17.1