Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp948574imb; Fri, 1 Mar 2019 20:41:36 -0800 (PST) X-Google-Smtp-Source: APXvYqx2WzDiSWT5RQAIVjK4n6dPyU/wQJwdqCPVIJfZOnigG8zWYKPZ0G80CgfsSe4ghbm9DpOl X-Received: by 2002:a63:6a48:: with SMTP id f69mr8240549pgc.7.1551501696538; Fri, 01 Mar 2019 20:41:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551501696; cv=none; d=google.com; s=arc-20160816; b=bwN8F3VPpUbu1WApgeX5FOmQsVSyIYS7b6HLeyWtVDftOjPtjzRFFECMI2anFrZHkX OSi/S8Njmozei1fPUowSJbOP3NSdRMt79jupNWvPwB9aGRqR+tQDD1L1Z2wIasy6mun1 4wNfdFJR8U+gKxbAVs7tObzXP85ap30tZ2h6nklGuRXqfT3es852TeLBCpXyAl2tC4xr XU+M1ReUDSqSWcgq3hOi+61+CFxS2XenF4Nc6itJP+xA6Iqb3seKH46CBhXKvG2xNFIl g0ibk6HciAa/Q8Dw9A/plZMiALqynTBqjJtF71mB56xuFS/LWShAq0TFOZJI64K80zHZ N3fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=T80MdXzCnVwzBeJXMQTkL4J5G0aH3MXHjAFEpqlA0WA=; b=Ry5U+kVEgAuczRytZq3rY6Q54qbxz2YPwOFP5EvVhcQSSOxfELzkFIJNc4CE15+XIQ 1bV2i+vAs/l8It8ylAbcxf5x8EMkY20lD2tcqEA/0aQoWeanajTezJELXBGVuoLkIxmK lS8KKGDvwZO7Cx2F40eFv+kYWDvA8h6TmgGZCtidSz0FKp358wi2hAR3zZsdhcwshTIn NrdG2RJlFrW3PMtLrKpbiiY0J3+LBHoD8qmsLRPHgR165/qvLsR6M91eXat+HzTLEe9/ YC37GrLDiS0cOK29Oiw3UAKy7HhYjwXCV0lM68pWxe2dT8/N7rksWvB+0g9bMmxANIm2 UO8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=H54t1Lwp; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cm17si13961062plb.149.2019.03.01.20.41.20; Fri, 01 Mar 2019 20:41:36 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=H54t1Lwp; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727909AbfCBEj3 (ORCPT + 99 others); Fri, 1 Mar 2019 23:39:29 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:46239 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726693AbfCBEj3 (ORCPT ); Fri, 1 Mar 2019 23:39:29 -0500 Received: by mail-pl1-f196.google.com with SMTP id c17so9263181plz.13 for ; Fri, 01 Mar 2019 20:39:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=T80MdXzCnVwzBeJXMQTkL4J5G0aH3MXHjAFEpqlA0WA=; b=H54t1LwpYL9KnRhB0RSkACShPDrChkkfBpcCaNyX8vbf/4K1S8jijCEuv5s9YRWUzf IQfvZ5krjRlj8Rq2oNvTgneiBXMPVs25FPE3SWCoDewQ5uPMgCa1KdmdjKd1A+b0HuYW b84nrR/0hqbAO0WaKor8odL6NOOJbwfUSbrIlgyVF7GZPm5gvHCUc7MysgXpAblBzbD4 H9dVCrvRfvxO5h+cnvrnW0jhXAYo457TNOL/m/9c3Lk7RSe396f4pj/1VvDRhEPWs3ao fcR476QUi6NVL5SAH72apw0w6maFPeOpjHRXh8/6cLrPQWt8a5q2LNaSLlsHov0ToFeK APZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=T80MdXzCnVwzBeJXMQTkL4J5G0aH3MXHjAFEpqlA0WA=; b=Cv2v9d4HAD4FhVOENBrMQkgjy6im9S/Dkj0XtTfgWd546zYE77VF8/BRD0jzlhp4oq ZZhsdfxb6pWiNviVzEXfybUIUwLMJCodUX9mJlKt2nBwbWB1YBn9/Odh4IahP0CIn46k aeWlA/RSpt/4qu6QhlvfJbNF3N8wLQUAavVwp9Hly84HiyQ3iubC6EkSX2s9rdQvbw20 AWfGUzcb4RTbuWWWbeZCPVktVFFkPecgaUwiFz/0dnQ3AhqqAxkvqJTSlNi4gqxSP/Ff AVT/cMgUcqbHybW7XRfFEATaGQRer845E4WQrcASUO83mf9fMI2PTGph/BDMyKwoWSGi syTw== X-Gm-Message-State: APjAAAU/cgf9FITAGEs/QfyznuUtrDolSzMu9ws2Zz1oeDBj2gqNyM4r e4A4YBNbyeWIpIQIOQzxLOE= X-Received: by 2002:a17:902:b709:: with SMTP id d9mr9235818pls.83.1551501568725; Fri, 01 Mar 2019 20:39:28 -0800 (PST) Received: from localhost.localdomain ([203.100.54.194]) by smtp.gmail.com with ESMTPSA id a24sm29102508pfo.160.2019.03.01.20.39.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Mar 2019 20:39:27 -0800 (PST) From: Yafang Shao To: vbabka@suse.cz, mhocko@suse.com, jrdr.linux@gmail.com Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, shaoyafang@didiglobal.com, Yafang Shao Subject: [PATCH] mm: compaction: some tracepoints should be defined only when CONFIG_COMPACTION is set Date: Sat, 2 Mar 2019 12:38:58 +0800 Message-Id: <1551501538-4092-2-git-send-email-laoar.shao@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1551501538-4092-1-git-send-email-laoar.shao@gmail.com> References: <1551501538-4092-1-git-send-email-laoar.shao@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Only mm_compaction_isolate_{free, migrate}pages may be used when CONFIG_COMPACTION is not set. All others are used only when CONFIG_COMPACTION is set. Signed-off-by: Yafang Shao --- include/trace/events/compaction.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/trace/events/compaction.h b/include/trace/events/compaction.h index 6074eff..3e42078 100644 --- a/include/trace/events/compaction.h +++ b/include/trace/events/compaction.h @@ -64,6 +64,7 @@ TP_ARGS(start_pfn, end_pfn, nr_scanned, nr_taken) ); +#ifdef CONFIG_COMPACTION TRACE_EVENT(mm_compaction_migratepages, TP_PROTO(unsigned long nr_all, @@ -132,7 +133,6 @@ __entry->sync ? "sync" : "async") ); -#ifdef CONFIG_COMPACTION TRACE_EVENT(mm_compaction_end, TP_PROTO(unsigned long zone_start, unsigned long migrate_pfn, unsigned long free_pfn, unsigned long zone_end, bool sync, @@ -166,7 +166,6 @@ __entry->sync ? "sync" : "async", __print_symbolic(__entry->status, COMPACTION_STATUS)) ); -#endif TRACE_EVENT(mm_compaction_try_to_compact_pages, @@ -195,7 +194,6 @@ __entry->prio) ); -#ifdef CONFIG_COMPACTION DECLARE_EVENT_CLASS(mm_compaction_suitable_template, TP_PROTO(struct zone *zone, @@ -296,7 +294,6 @@ TP_ARGS(zone, order) ); -#endif TRACE_EVENT(mm_compaction_kcompactd_sleep, @@ -352,6 +349,7 @@ TP_ARGS(nid, order, classzone_idx) ); +#endif #endif /* _TRACE_COMPACTION_H */ -- 1.8.3.1