Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp499587pxa; Wed, 12 Aug 2020 07:19:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVOodIRjVyJVDTKTbvtK8SO9D3vlOOsJxtBxL3UNWBNcbVy22Y7pt8lzRZCFLtQAvPHa9Q X-Received: by 2002:aa7:c788:: with SMTP id n8mr150120eds.146.1597241941428; Wed, 12 Aug 2020 07:19:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597241941; cv=none; d=google.com; s=arc-20160816; b=aMVoQlnGhd4G+RlGAjFIOsI1ZFMxbU/0j+vPgprsk8Ol4zofR9teyONDQ8i9FAKo+j mENFhzewUdgfXSptLgmNM6fingkK6RDjw4kT3yP5+xLcM4S2YUZC4kY7BMsEQbprqB64 DOa9XG6Bm4/DGRJErQ7SnscgoAOwsieZpIFsUiEiOXC3f5JPWlck5fUS3TvlPGoVcpdl 5jLKynmxGT5w/eqtJz8/pGYJDDlqsfSXiVcSUnMBgYDXd8h+J1HGsrU6dKOFOo3rhlKd CLh2F2ucbexxZVDcjZXBzxXtA5AsTz62vuMVhT169iKbjGFkp+QB6Cpb0JGKMjB4euRa JVNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Ito2LlDmzsdhC/SQqqygCG03Cvyf/7VRDwmJOWnI5Qg=; b=aGg/FU72Ya53HcHAY5vTv5sKEayoVGF8rajuYSjJNsNL2KTFk695DQcFzSTBIWF8rp 3tTEoykM4CqumdxT+HZMrZn+k8wGiM/dvhjeyDRFYVxT/Nx6QLxLiGyULTp8pb7y0zMm HEtadHMu016Ig1N/RsaFuMOHWaUOdKPQ1C3WK+u7rkbrqOd5HrQZpSDh5XKz3f62H+Vz Yg1cJYaIMyfM2uKZygN57BiPj3qUCniTZnIMbgpQOiQOdcWLMJ0TB/1Hy12W0q/JFPWe 2CJBDE+tEITzPy+zV0cxl7uDvp75RHbHMc0cqHhjc1AztUp/K4CLUCBzkybCWwrs8huO FsJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k7si1279348edr.177.2020.08.12.07.18.37; Wed, 12 Aug 2020 07:19:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726557AbgHLOSE (ORCPT + 99 others); Wed, 12 Aug 2020 10:18:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:36132 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726468AbgHLOSE (ORCPT ); Wed, 12 Aug 2020 10:18:04 -0400 Received: from home.goodmis.org (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EA5B420781; Wed, 12 Aug 2020 14:18:02 +0000 (UTC) Date: Wed, 12 Aug 2020 10:17:55 -0400 From: Steven Rostedt To: Christian =?iso-8859-1?Q?K=F6nig?= Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Shashank.Sharma@amd.com, daniel.vetter@ffwll.ch, alexander.deucher@amd.com Subject: Re: [PATCH] drm/amdgpu: adjust the pid in the grab_id trace point Message-ID: <20200812141755.GA8136@home.goodmis.org> References: <20200807133658.1866-1-christian.koenig@amd.com> <20200807133658.1866-2-christian.koenig@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200807133658.1866-2-christian.koenig@amd.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 07, 2020 at 03:36:58PM +0200, Christian K?nig wrote: > Trace something useful instead of the pid of a kernel thread here. > > Signed-off-by: Christian K?nig > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h > index 5da20fc166d9..07f99ef69d91 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h > @@ -228,6 +228,7 @@ TRACE_EVENT(amdgpu_vm_grab_id, > ), > > TP_fast_assign( > + __entry->ent.pid = vm->task_info.pid; If the ent.pid is not the pid you are interested in for this trace event, just add a "pid" field to the trace event and place it there. Do not modify the generic pid that is recorded, as we would like that to be consistent for all trace events. The "ent.pid" turns into "common_pid" in the field, leaving "pid" free to use. Other trace events (like sched_waking) record a pid field that is not the same as the pid of the executing task. The "ent.pid" should always be the pid of the task that executed the event. -- Steve > __entry->pasid = vm->pasid; > __assign_str(ring, ring->name) > __entry->vmid = job->vmid; > -- > 2.17.1