From patchwork Wed Jun 1 11:18:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunyan Zhang X-Patchwork-Id: 9147199 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 044F260777 for ; Wed, 1 Jun 2016 11:21:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E95C82040D for ; Wed, 1 Jun 2016 11:21:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB760269B2; Wed, 1 Jun 2016 11:21:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 79F912040D for ; Wed, 1 Jun 2016 11:21:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b84C0-0000No-G5; Wed, 01 Jun 2016 11:20:08 +0000 Received: from mail-pf0-x22a.google.com ([2607:f8b0:400e:c00::22a]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b84Bp-0008Bp-Eh for linux-arm-kernel@lists.infradead.org; Wed, 01 Jun 2016 11:19:58 +0000 Received: by mail-pf0-x22a.google.com with SMTP id f144so13561809pfa.3 for ; Wed, 01 Jun 2016 04:19:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=t7rpEsFrH2khLu3+mFPBZ6MBDS0IVIE2I6Lt4kSX3oA=; b=j7Bi46Ae+k7XdyhswaoiLeXZ001f3mSNjoLewrmz+4yLKZitZrMXizPER7pOUXFZ9P YuF5Vu7ae0xgZBSW+CXSGvCUanUW0CTcJbByQCeRZ00RPyieSVkljUJmOxOuUUxw1LGm qIY8FpVMFLiI+f+Z1V1ief2FCsMEi2H8eiWi4= 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=t7rpEsFrH2khLu3+mFPBZ6MBDS0IVIE2I6Lt4kSX3oA=; b=U0udXlNhZsFBVrV9S62nciTTEsAZV0FOX86BqVCcf6AM+zgu6xeRraMKLv3M5CTES3 R/HN4XhKm2o9eGtJ8AdcapiH9oUSy3seWBZfbzEU3qSHXwgzKIrRPm2rQMB0oK1cHfwZ k5mC1cA+vn2ZrzqruNiVXrl0V0/4ZGW5nCe9Gn97SmV8xfhBFibNeYMAN+kga4W1wm8U tLr4zpK4VLtMFCcyB2fXxxxzpb1C1mX1HBKkFg7KQ2sV9hsAdVomB5xTaQI2PNukopq9 KsicZIx2ruGJ+tAq9G78NfOQk0wgkzJrC8d18iUgj4+n8QT2itTGxnG9r+1CYVystBmU 3WJg== X-Gm-Message-State: ALyK8tJ4q64ZqsUcRoqNEhQvVH3r6eTLl9ahN4iCwEp/RuYzDOvPOatjzrLORRKvi2syl4iM X-Received: by 10.98.100.83 with SMTP id y80mr7738078pfb.84.1464779976432; Wed, 01 Jun 2016 04:19:36 -0700 (PDT) Received: from zcy-ubuntu.spreadtrum.com ([175.111.195.49]) by smtp.gmail.com with ESMTPSA id o64sm13254234pfb.76.2016.06.01.04.19.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Jun 2016 04:19:35 -0700 (PDT) From: Chunyan Zhang To: rostedt@goodmis.org, mathieu.poirier@linaro.org, alexander.shishkin@linux.intel.com, mingo@redhat.com Subject: [RFC PATCH 3/4] trace: Duplicate the output of the function trace logs to STM Date: Wed, 1 Jun 2016 19:18:58 +0800 Message-Id: <1464779939-24986-4-git-send-email-zhang.chunyan@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1464779939-24986-1-git-send-email-zhang.chunyan@linaro.org> References: <1464779939-24986-1-git-send-email-zhang.chunyan@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160601_041957_572164_8CDE8102 X-CRM114-Status: GOOD ( 11.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: zhang.lyra@gmail.com, linux-kernel@vger.kernel.org, tor@ti.com, philippe.langlais@st.com, mike.leach@arm.com, nicolas.guion@st.com, linux-arm-kernel@lists.infradead.org, maxime.coquelin@st.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds an output from Ftrace to STM. That being said, Function trace messages would also be duplicated to STM buffer when being stored into ring buffer. Signed-off-by: Chunyan Zhang --- kernel/trace/trace.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 8a4bd6b..d613053 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -44,6 +44,7 @@ #include "trace.h" #include "trace_output.h" +#include "trace_output_stm.h" /* * On boot up, the ring buffer is set to the minimum size, so that @@ -1884,8 +1885,10 @@ trace_function(struct trace_array *tr, entry->ip = ip; entry->parent_ip = parent_ip; - if (!call_filter_check_discard(call, entry, buffer, event)) + if (!call_filter_check_discard(call, entry, buffer, event)) { __buffer_unlock_commit(buffer, event); + ftrace_stm_func(ip, parent_ip); + } } #ifdef CONFIG_STACKTRACE