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: 70603 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp2324066qgy; Tue, 21 Jun 2016 19:49:35 -0700 (PDT) X-Received: by 10.98.149.149 with SMTP id c21mr31837958pfk.73.1466563775234; Tue, 21 Jun 2016 19:49:35 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id u29si43837389pfi.150.2016.06.21.19.49.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Jun 2016 19:49:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org 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-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:400e:c00:0:0:0:235 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 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+patch=linaro.org@lists.infradead.org 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(-) -- 1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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