From patchwork Tue Dec 8 19:39:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Shi X-Patchwork-Id: 57897 Delivered-To: patch@linaro.org Received: by 10.112.147.194 with SMTP id tm2csp243808lbb; Tue, 8 Dec 2015 12:00:54 -0800 (PST) X-Received: by 10.98.71.194 with SMTP id p63mr7586721pfi.66.1449604854005; Tue, 08 Dec 2015 12:00:54 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fl5si4138966pab.14.2015.12.08.12.00.52; Tue, 08 Dec 2015 12:00:53 -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; dkim=neutral (body hash did not verify) header.i=@linaro-org.20150623.gappssmtp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752732AbbLHUAu (ORCPT + 28 others); Tue, 8 Dec 2015 15:00:50 -0500 Received: from mail-pa0-f50.google.com ([209.85.220.50]:35409 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752630AbbLHT77 (ORCPT ); Tue, 8 Dec 2015 14:59:59 -0500 Received: by pacej9 with SMTP id ej9so16966190pac.2 for ; Tue, 08 Dec 2015 11:59:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Ptn35g1hO6J57frjA8lfRovkfrpO78oYUqcq+7l+sLM=; b=bi5oaeE1WhUhe1ytIYDiFxbbnxiT+BqbQOkDwJRBw5rhjVjXJBNFwQaO7HJO7GCcIM +GhAXgfgpmhjExGTpssa+nRCmaOSmkZ4O4txhfGNgL24J/HqmrSXSXUfC+TieiMhYw/y 8ukAohROgEeky5wr2duHC84QbN106RE6X1kR3SfItVSaC1YkpIZaPLt3NTtSTOp7xPv5 djbLcHE5BcGEVwrYYRgn3bb10lLfgu4Ent9KbqkTfFfT9/4eM/NJpixQA1wGZ7NlpI0X ldjGwbHopnXsRQVQR/3mOjcRzf/v8kIqtKKyPxIxIb/3+njaOicCYFEiy9p0cBuUhxaW 4Z6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Ptn35g1hO6J57frjA8lfRovkfrpO78oYUqcq+7l+sLM=; b=NouQ3OoW5lr0yCcg3z4FuoWe396nqEz5wX+6DfZqVslu5x14zBgpTSteGMMKC/nntf bvtrrUKMIUWW0a589UDROZKiAlM2e0iLk0jcA2/GGcAJ/cYWcHEUloTg++9T/qpV0uLb JLhcaFPV5dDC1GeVHjkIyrKNjwlR97UKaJN6YY4IQviocpxNE1v5Ac8RduBmQi7Z106C Km/Ei6zTxTl0KzlktyD5F1qWMm53lp34urBMWyBS1slUbGIqT/lkl8PBwIBEe8qp3GXA 5lPpGQIDUfsLHIH7b8YodScshA5N2l03Ff0i5QznZmD2dizHmvYorn5ePcWkiTvVLAh+ ov4g== X-Gm-Message-State: ALoCoQkQyS9aYM3S5oxTnwFz7DFtH6+4OjJbKuYGmN7RwfmastluI7KEyjb7dQulby9mgpHRjDLd874Jg+9dbpeLXbwyVp84aQ== X-Received: by 10.66.153.198 with SMTP id vi6mr2478674pab.37.1449604799301; Tue, 08 Dec 2015 11:59:59 -0800 (PST) Received: from yshi-Precision-T5600.corp.ad.wrs.com (unknown-216-82.windriver.com. [147.11.216.82]) by smtp.gmail.com with ESMTPSA id 25sm6479658pfp.62.2015.12.08.11.59.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Dec 2015 11:59:58 -0800 (PST) From: Yang Shi To: akpm@linux-foundation.org, rostedt@goodmis.org, mingo@redhat.com Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linaro-kernel@lists.linaro.org, yang.shi@linaro.org, linux-sh@vger.kernel.org Subject: [PATCH v3 6/7] sh: mm/gup: add gup trace points Date: Tue, 8 Dec 2015 11:39:54 -0800 Message-Id: <1449603595-718-7-git-send-email-yang.shi@linaro.org> X-Mailer: git-send-email 2.0.2 In-Reply-To: <1449603595-718-1-git-send-email-yang.shi@linaro.org> References: <1449603595-718-1-git-send-email-yang.shi@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Cc: linux-sh@vger.kernel.org Signed-off-by: Yang Shi --- arch/sh/mm/gup.c | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.0.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/arch/sh/mm/gup.c b/arch/sh/mm/gup.c index e7af6a6..d4c9a6e 100644 --- a/arch/sh/mm/gup.c +++ b/arch/sh/mm/gup.c @@ -14,6 +14,9 @@ #include #include +#define CREATE_TRACE_POINTS +#include + static inline pte_t gup_get_pte(pte_t *ptep) { #ifndef CONFIG_X2TLB @@ -178,6 +181,8 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write, (void __user *)start, len))) return 0; + trace_gup_get_user_pages_fast(start, (unsigned long) nr_pages); + /* * This doesn't prevent pagetable teardown, but does prevent * the pagetables and pages from being freed. @@ -244,6 +249,8 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write, } while (pgdp++, addr = next, addr != end); local_irq_enable(); + trace_gup_get_user_pages_fast(start, (unsigned long) nr_pages); + VM_BUG_ON(nr != (end - start) >> PAGE_SHIFT); return nr;