Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4427419ybv; Mon, 10 Feb 2020 19:22:30 -0800 (PST) X-Google-Smtp-Source: APXvYqzKFxkRUT14JzmDKmPXks79AuSJta3pgT9OoXRHKCSdi8AEqFcJs35yYjU8uh+bRyOUwN1e X-Received: by 2002:a05:6808:611:: with SMTP id y17mr1538574oih.146.1581391350373; Mon, 10 Feb 2020 19:22:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581391350; cv=none; d=google.com; s=arc-20160816; b=NibOQz6dPPRu2hOVu8I+49IzeHDIHtQ6JSGDuONjKBNzwiPcb4HwcGKwpyeDfS76CQ LNj7RkXGgIc7iphBXW/3ftPYX+9alSH8vhken/oKgKdLwyEktkyoumOAK1gIBecrlppC 1toiNAX0NPrcQU0lqXdLCQaTNE7f7Asn6L/Ttb1KgTRq6axMXbP2RzM2JbWZOMxGnNq1 MiFHREfvh0uc7IXDIFOiqWU2PnaSUWzmB8M6qO2Mey1t37r6pwvArSnzZejqy2BrRb30 dm0mt57MQZ4QjDF6pgO+saXe1XAk1mLwYtkh+dPJ0I2AobC+5ly5lNOlgxiuDt2Fwl4m UmSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=/v3Y5yB0GNwSZoV2yP/Xkt0bAF6eoO8pvtANkGmOXmE=; b=W7wKkBVl5vrcuszgTsqn2+zZEMyQwVQKJFP+Y1dC7idTJHrovpRyEeenN4CfTE6gfy OqULsJ3lWA4siXTee8MKpI1fhgVGr5mZ7K5B9nn4E5mD3N7bjRcrfzBisWt5XDP/+EyB yIDPrwqqZThprs07WFj163QGL+MkHvsWZXJSVrb1P5c9w79KCzxr4icerTu/6Puzp8UE KTmZPgNOhfqG57wqdSEEc+zZozShyZ4nmRLxpd3olgZSxl79IdehABEq6s2YMLgkIk39 sjAzbGen60xrNYSrbIvVWtq/Klf4RvJmID4YO226QPwVHtHS8mPMi2IL02HEcJ4Jl7Xl D5QQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v18si1211404otq.209.2020.02.10.19.22.18; Mon, 10 Feb 2020 19:22:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727079AbgBKDPX (ORCPT + 99 others); Mon, 10 Feb 2020 22:15:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:60792 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726738AbgBKDPX (ORCPT ); Mon, 10 Feb 2020 22:15:23 -0500 Received: from rorschach.local.home (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 BCB0720714; Tue, 11 Feb 2020 03:15:22 +0000 (UTC) Date: Mon, 10 Feb 2020 22:15:21 -0500 From: Steven Rostedt To: Yiwei Zhang Cc: mingo@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Add gpu memory tracepoints Message-ID: <20200210221521.59928416@rorschach.local.home> In-Reply-To: References: <20200211011631.7619-1-zzyiwei@google.com> <20200210211951.1633c7d0@rorschach.local.home> X-Mailer: Claws Mail 3.17.4git76 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 10 Feb 2020 19:05:35 -0800 Yiwei Zhang wrote: > Thanks for the prompt reply! > > The tracepoint proposed here is for tracking global gpu memory usage > total counter and per-process gpu memory usage total counter. The > tracepoint is for gfx drivers who have implemented gpu memory tracking > system. The tracepoint expects the de-duplication of the shared memory > is done inside the tracking system. > > On Android, the graphics driver has implemented gpu memory tracking. > First, we'd like to profiler GPU memory with this tracepoint. Second, > we implement eBPF programs and attach to this tracepoint for tracking > GPU memory at runtime on production devices. However, the tracepoint + > eBPF approach requires the tracepoint to be upstreamed so that it's > considered a stable interface which Android common kernel can carry it > forever. Then it needs to live in the drivers/gpu directory. kernel/trace is for tracing infrastructure and not for adding trace points. -- Steve