From patchwork Tue Dec 8 19:39:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Shi X-Patchwork-Id: 57894 Delivered-To: patch@linaro.org Received: by 10.112.147.194 with SMTP id tm2csp243394lbb; Tue, 8 Dec 2015 12:00:09 -0800 (PST) X-Received: by 10.98.80.198 with SMTP id g67mr7341528pfj.107.1449604807124; Tue, 08 Dec 2015 12:00:07 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id wp3si7065464pab.160.2015.12.08.12.00.06; Tue, 08 Dec 2015 12:00:07 -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 S1752677AbbLHUAD (ORCPT + 28 others); Tue, 8 Dec 2015 15:00:03 -0500 Received: from mail-pf0-f175.google.com ([209.85.192.175]:33827 "EHLO mail-pf0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752587AbbLHT76 (ORCPT ); Tue, 8 Dec 2015 14:59:58 -0500 Received: by pfbg73 with SMTP id g73so17426079pfb.1 for ; Tue, 08 Dec 2015 11:59:57 -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=RMZOZ1XZnT+HiZTY068AqR4dLGpIz0D427ZmGFMv91I=; b=saWiyMoT0r8v9BJmMNjUtrdC83CTHlGIKdAUPt9w1HTrCJt7dTLPx15Bbk3TFU55mO mm8EQhXUjWddjmxFUEsHRSm7jGd+sHJKMw+4zGYz0ej9vd+v23jO8yS12yjpPFKL0FEh Em+6EVaNW4TBEMRQzqBPi3Yan9Dli234A+xbJYULSCfktOEpqWAGsDUBDqJQe4Kxyy6m C7lY8KH2chAoa4bOSgd9pkxY2Hg6KdOFpUT+xcK+6YdZlDNHSqmLDhHG+fctXq+LAPQV uEgpFVeaAEB6Kn0PuzIkE9MX9TXnRPS/qLKXqlgB78Apu9M53pFdWZ3QDdYNqIfUF4N0 8lWg== 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=RMZOZ1XZnT+HiZTY068AqR4dLGpIz0D427ZmGFMv91I=; b=Xz6x5JpxmEQn0IDvEDYfTJDIbkkblJcIQldNzwtvRgfE1D9rjquzZ0oG0ghAnQx5pB +jYi6h7VNEySlN85ZxIcuo6ZyXX6lDkMmAEw5OKrJDqmoiPaMn3QLhx2/G/q6aIqyplw eqIPVps7Thmh3GpBEJsXANjAfsqX9LTwSsnwifuy37Vt4Cg/7i5Tb1ka9FyNcck11jG5 dncz6mY2Ib4B8qAAua1/WHmOCjnvHEZgaP6H9KplLZu0PlrUs76++pCKQkO/oreLhkRT 4ts5cFqiJffAUSHFFIm5oYMddCVc29AAdqlTLitHEuhSc1fQe29c4iw6J8MLusTs/bOE 3hBw== X-Gm-Message-State: ALoCoQlMDxcntk5mwUOTwNgQbVXYCUrrIZySohQHIhayycib6rtge3kEa8+ZHOc3zJjDofQopiqPMvJYYLkgaOrpStMxXo8wUw== X-Received: by 10.98.19.12 with SMTP id b12mr7461567pfj.78.1449604797368; Tue, 08 Dec 2015 11:59:57 -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.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Dec 2015 11:59:56 -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-mips@linux-mips.org Subject: [PATCH v3 4/7] mips: mm/gup: add gup trace points Date: Tue, 8 Dec 2015 11:39:52 -0800 Message-Id: <1449603595-718-5-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-mips@linux-mips.org Acked-by: Ralf Baechle Signed-off-by: Yang Shi --- arch/mips/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/mips/mm/gup.c b/arch/mips/mm/gup.c index 349995d..2107499 100644 --- a/arch/mips/mm/gup.c +++ b/arch/mips/mm/gup.c @@ -15,6 +15,9 @@ #include #include +#define CREATE_TRACE_POINTS +#include + static inline pte_t gup_get_pte(pte_t *ptep) { #if defined(CONFIG_PHYS_ADDR_T_64BIT) && defined(CONFIG_CPU_MIPS32) @@ -211,6 +214,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); + /* * XXX: batch / limit 'nr', to avoid large irq off latency * needs some instrumenting to determine the common sizes used by @@ -291,6 +296,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; slow: