From patchwork Wed Jun 22 02:46:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunyan Zhang X-Patchwork-Id: 9191769 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 8116E6075E for ; Wed, 22 Jun 2016 02:49:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 761062832F for ; Wed, 22 Jun 2016 02:49:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6A80A283DF; Wed, 22 Jun 2016 02:49:57 +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 C160A2838C for ; Wed, 22 Jun 2016 02:49:56 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bFYDZ-0002pb-1x; Wed, 22 Jun 2016 02:48:41 +0000 Received: from mail-pf0-x235.google.com ([2607:f8b0:400e:c00::235]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bFYDI-0002YF-H0 for linux-arm-kernel@lists.infradead.org; Wed, 22 Jun 2016 02:48:25 +0000 Received: by mail-pf0-x235.google.com with SMTP id h14so12619174pfe.1 for ; Tue, 21 Jun 2016 19:48:04 -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=gv9FrshBeg4hFMr7z3IVJoL6z0DHaO0Oy9law/zFsTw=; b=kiCOy5lCS6JygXLxrHo3niaMpu3Fks/wKbalZ9yyIr/kkVWVR16Kkf6T/GZAGl1tvS hf0jntLWESS1ibGddrY83CRgzu5MIXJ2hiwC9WHhnF+Lp4ZMEXM0BCcdVswX4oSE3129 JAscJKp2Fjx8JD+6p5vzxvaAK88XzyCxk7MiA= 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=gv9FrshBeg4hFMr7z3IVJoL6z0DHaO0Oy9law/zFsTw=; b=i44vncqSkW+ceJlq+VJQx9Q8zlYJz9c6lAu7pe2o5Prp6nC4bHsLizCYa6xuw8L7gZ piUGymtNWkeZ5q6ggFSUBLUdSSSmt7ys1lHzN1NdS97SdkQtx84PlWCPkgzWFBgbZhiR jjWvkA7uAw/1d3dlfpWiGqKiZ7pwYFvRI6tbnwZBOGa+RwPJ0JuW3sZSCf7n9DJ0QcKP AMGOSDyb7wCGKTnCpkTDLM4PkmBAQ2i43d4VKVXjfUeVyyNBht1Cyj0LiA4zZA2PxwjW 8tmGWVwokP/+bZz/zwrvatnbwIg2H9G1EfOvwB9u6PqeOahwS0Rrg8o5WtVyTFfIg1Qf O2gg== X-Gm-Message-State: ALyK8tJGNm0P3iLWxzGVSgoMDXSzsbDsG+YK5x91JQcYW/QNBuobvdxeIgk/677JHGFQFMNV X-Received: by 10.98.35.27 with SMTP id j27mr32582945pfj.10.1466563683779; Tue, 21 Jun 2016 19:48:03 -0700 (PDT) Received: from zcy-ubuntu.spreadtrum.com ([175.111.195.49]) by smtp.gmail.com with ESMTPSA id y70sm98867836pff.25.2016.06.21.19.47.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Jun 2016 19:48:03 -0700 (PDT) From: Chunyan Zhang To: rostedt@goodmis.org, mathieu.poirier@linaro.org, alexander.shishkin@linux.intel.com, mingo@redhat.com Subject: [PATCH V2 3/4] trace: duplicate function pointer to STM Date: Wed, 22 Jun 2016 10:46:52 +0800 Message-Id: <1466563613-31578-4-git-send-email-zhang.chunyan@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1466563613-31578-1-git-send-email-zhang.chunyan@linaro.org> References: <1466563613-31578-1-git-send-email-zhang.chunyan@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160621_194824_619620_8D9BAD62 X-CRM114-Status: GOOD ( 10.73 ) 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 inserts an output from Ftrace to STM, logs the pointer of the functions and their parents to STM. 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..ed9e1b4 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -41,6 +41,7 @@ #include #include #include +#include #include "trace.h" #include "trace_output.h" @@ -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); + trace_func_to_stm(ip, parent_ip); + } } #ifdef CONFIG_STACKTRACE