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: 7802051 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 380689F387 for ; Tue, 8 Dec 2015 20:01:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5321E2047B for ; Tue, 8 Dec 2015 20:01:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 48C6220462 for ; Tue, 8 Dec 2015 20:01:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752707AbbLHUAu (ORCPT ); Tue, 8 Dec 2015 15:00:50 -0500 Received: from mail-pa0-f49.google.com ([209.85.220.49]:35409 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752626AbbLHT77 (ORCPT ); Tue, 8 Dec 2015 14:59:59 -0500 Received: by pacej9 with SMTP id ej9so16966189pac.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=g8081hUs9UzND/wizphVJx1gDbY8x+4Pd0vPRChetBVJYAzty2/2CzrW9ApLElJpfk Q5ugREa8McE6zPalcxNfOuM84L8f8XNY9YobxkUos60UBQLZJx6p7LDszyutW6qzWvIL 1F+aNpsWdZ62ZwWWqu4MJAlLhNeX0E+WmR+0HNN/I+WmaDMRGyKHcT56Ra07PBLdqN1C y6AsgLSsgm7vpSwb+al9JzgREdcLWJRdKg4lOK5JXi/tmKx5IQ55NSAqnMcMTo3CFUBB AdcaLokUroC+fyujbxwtCJoc4EA36yL3h79DPS/bHQH9+7oOHEEZk90Fd3pUhxvonfbi i5Bg== X-Gm-Message-State: ALoCoQmKsagnwVEYUoN3cVBwXLpTpQk5Z12kNe704Q57OWSz9U7QTwxqiAu0aar1xtJsGTA9OnxllACvOQmmPu5QU5ilTTkA9w== 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-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..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;