From patchwork Wed Dec 9 17:29:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Shi X-Patchwork-Id: 7811091 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 550039F350 for ; Wed, 9 Dec 2015 17:51:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 72B592051F for ; Wed, 9 Dec 2015 17:51:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 764B9202B8 for ; Wed, 9 Dec 2015 17:51:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753297AbbLIRvF (ORCPT ); Wed, 9 Dec 2015 12:51:05 -0500 Received: from mail-pf0-f175.google.com ([209.85.192.175]:35834 "EHLO mail-pf0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753070AbbLIRtZ (ORCPT ); Wed, 9 Dec 2015 12:49:25 -0500 Received: by pfu207 with SMTP id 207so33386051pfu.2 for ; Wed, 09 Dec 2015 09:49:24 -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=aoL0ftsSKgMzgYcgIlp+iY7vbBE4uYLHhtWxy/V41BU=; b=U0kQocNIKwfshIq7ohfSGnrGhMkQv0/1yhxhw77Cttq4vKP6oEFOjvT/FrAaAyOf2h Wa3+Ym4xBWh19HSyrhXc/O4n9nhLJ78Vz9ANdQKgOCpIJjwIluAy/RYTHqoz9Cu5WqiB a9+E9M1KuRCYw/GPTGKHAzTTCK6X69tnRU36BjVsrwlCxKaYAI89l0tKKAnE8LgL/1Wn YjeW8MX/WVEdzOIM+l1sQGBy0ZyKRD8G/DuxBAx+/4vIXJm9BkH9xpg/rbxPe9Y+RNDw qNZ5g8xgFrr/DYDwnc0KDS/EZodXZd3O9S/o297wKADnrIg9zz4kNzVyXa+NIBm7Zsa/ E1lA== 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=aoL0ftsSKgMzgYcgIlp+iY7vbBE4uYLHhtWxy/V41BU=; b=ardxnyxZ8k4g0ITSdv3Qli0azMBnzvivS8aadasFVZt+J9MyzSmvEUZHL1fQHurz4h OBLsFbyEmhx9dqj3HMDxk/Jc3CLCJ/V4HAA6Dp/jv23H++QeErfqzN3NcC0vTcrScrHM c+JxJJFzg5Za5EE8tbeK9XvaQTWO/8cfwgb30bQLIsMC4uE5WeqU++IO5JFIBpO/K2/6 +tL9hkHcsPf/7hdszSYSsp6LA9juQLqe7Sa0DP55pDKp03DWQLVGMfAimp8mwyj83O3y 62CFrAKTgO0pMYz1gJCcA8xesKrpJ8b+XOLW0OGWMyp0EemGaaKyhdNm27wMqHfW9dB9 JvCw== X-Gm-Message-State: ALoCoQmtpwtrRcsHMTwHCUrTTJukhjGJNvArPAb76KYq8qr7W2WdAS/dVLZt/jRn4o0klPPdV0+Y8FY7A6E8Dnzywc9NEKJ+ww== X-Received: by 10.98.15.215 with SMTP id 84mr5296pfp.49.1449683364620; Wed, 09 Dec 2015 09:49:24 -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 l20sm13049117pfi.10.2015.12.09.09.49.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Dec 2015 09:49:23 -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 v4 6/7] sh: mm/gup: add gup trace points Date: Wed, 9 Dec 2015 09:29:23 -0800 Message-Id: <1449682164-9933-7-git-send-email-yang.shi@linaro.org> X-Mailer: git-send-email 2.0.2 In-Reply-To: <1449682164-9933-1-git-send-email-yang.shi@linaro.org> References: <1449682164-9933-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 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/sh/mm/gup.c b/arch/sh/mm/gup.c index e7af6a6..fa72aac 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, 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, nr_pages); + VM_BUG_ON(nr != (end - start) >> PAGE_SHIFT); return nr;