From patchwork Wed Dec 9 21:22:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Shi X-Patchwork-Id: 7812361 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 73A02BEEE1 for ; Wed, 9 Dec 2015 21:43:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 88CE42054B for ; Wed, 9 Dec 2015 21:43:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8E0C82054A for ; Wed, 9 Dec 2015 21:43:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752399AbbLIVmy (ORCPT ); Wed, 9 Dec 2015 16:42:54 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:36000 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753079AbbLIVm1 (ORCPT ); Wed, 9 Dec 2015 16:42:27 -0500 Received: by pacdm15 with SMTP id dm15so35952991pac.3 for ; Wed, 09 Dec 2015 13:42:27 -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=f7HiUQaljIIqCCv7pSscI5JxIPgBoyQ9mIHuyaM24W0=; b=Nz97uCPKoGhQ6/7t547OwzvS+RVwv3RycHLcX2Ned8FZ8SG/5z41W7iMLbUth7gP9v HVJTGnHivpS+MFuxgIgjUnCmIs/GO0KNAJLvT9yMqrwHC088tlpvYVmJqnQs1jA5xQXj h1Gu1WYcW+nkeBBnDQWMNUGRTzt5UrdkAO0sn/942j/JHhzTfF9V54cZaO91cufg1tjK bzBDADCruj5QRSPYOpAgzvKHF/ruFHMLf7fnFCMwjSnlbJdwFT8wKSSVeK8mP/LqT1J0 iasekHob5H9BKzF+IEB0CZJwjqfZpG3xi4ABe7xluSvNkzwuVf1VwzUHg11UY11ZfHj5 AUZA== 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=f7HiUQaljIIqCCv7pSscI5JxIPgBoyQ9mIHuyaM24W0=; b=AmQiqtp3bzq3IiduNLhS37P0uFbHszw5G9nTXFK74AUaQwWQUdVm5BBKXWPE0Y7F4K bYpB/wYTLUV1pMMqyDdH4viGTn7q6RLfjCa1SE0w5bSO+AIPDqbd22w5zLTb3GeoVEVm cx6wtTHIZt4sRRO9OIq8fHk9IbpefjtEiAJFgH8axHziKFJM1dPITE7Gz12yw8vD9Qra ZbajiCeEbgY0Zoxda0aGOsCXJx0QYQOajNLWJTyAhK5WqLN2am1bXev0GE1ulrh+z22A lg8H0L9h9g+lLN9BVqzRq5Y6et3Q9uoVycs0eb2duLqyvUC3v55IZxZgVD/zPj989jnK tArQ== X-Gm-Message-State: ALoCoQn6Ojl8OCGYC9DHwuFbeBM/yzXK2jzZi+1pOnoem3OLxd7SU6g0MFpKaW6Lpf/zpPmHUzZio7q4UIj7ukAwqI37DkL5AQ== X-Received: by 10.66.221.42 with SMTP id qb10mr11344386pac.51.1449697347263; Wed, 09 Dec 2015 13:42:27 -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 f76sm13717090pfd.49.2015.12.09.13.42.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Dec 2015 13:42:26 -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 v5 6/7] sh: mm/gup: add gup trace points Date: Wed, 9 Dec 2015 13:22:30 -0800 Message-Id: <1449696151-4195-7-git-send-email-yang.shi@linaro.org> X-Mailer: git-send-email 2.0.2 In-Reply-To: <1449696151-4195-1-git-send-email-yang.shi@linaro.org> References: <1449696151-4195-1-git-send-email-yang.shi@linaro.org> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Cc: linux-sh@vger.kernel.org Signed-off-by: Yang Shi --- arch/sh/mm/gup.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/sh/mm/gup.c b/arch/sh/mm/gup.c index e7af6a6..dc80480 100644 --- a/arch/sh/mm/gup.c +++ b/arch/sh/mm/gup.c @@ -14,6 +14,8 @@ #include #include +#include + static inline pte_t gup_get_pte(pte_t *ptep) { #ifndef CONFIG_X2TLB @@ -178,6 +180,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, nr_pages); + /* * This doesn't prevent pagetable teardown, but does prevent * the pagetables and pages from being freed. @@ -244,6 +248,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, nr_pages); + VM_BUG_ON(nr != (end - start) >> PAGE_SHIFT); return nr;