Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp145288pxk; Wed, 2 Sep 2020 17:25:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQyyIUVmvVk3iiLjnyAIou4TcOXOZSQzG/wFT4Sdg5SWceTzkAKK9EDa7Odl4CW1j/oDbc X-Received: by 2002:a17:906:6d81:: with SMTP id h1mr676134ejt.436.1599092749297; Wed, 02 Sep 2020 17:25:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599092749; cv=none; d=google.com; s=arc-20160816; b=csifkZF+6HxNUapOW3NMJlKDji5M2BVZgSmnlxs0wRYUwyWTeXsjNF890GEcP0fQsx q5GvGD3aMIgTRfHJPKwA+ISf7LO9FAeMj0T0Bl/Gb2X6/mGp/kD8jW4XcdaS4M2CiYAJ +QjyrE8D3w2xknO6KTyemS7b5YNfPXlWHPTSbhFOeaC6TZH3dKR/hHj48v0MZ2d/mAN3 ttIUMf4hNCPsKarLmF6eDopBuxP7PFOif5rMMed/5H1AejIGxahtNXKqGuwPjxRIJltm dqJ4K6wSym41Jl6QUxtp9Zs0ADIRiR92ut6nA14U9QpUdUbkyZMG2FsnD+4DlecN9DbV kSjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dmarc-filter:dkim-signature; bh=DWvh/xe4da4kqEIchXLMEtV/mjQkWQ1/j/n7f+uAWvc=; b=uhUSLa7JZRMZVMKdr+P8hH9Z86m6KXfm9ykEZMiEMs3l3dX6WOP2NCz7a4UYwRRv9d 6Mr8Vo0O4sg81PqVqrjbpdcerxiEWmvPeKbJiRIk24vaQXJ6FBwP+s7xC2ZEMtHTDBt9 4KLRrdve4O6PncY7EwJBqcA5vFSUemSIA6Kn/d0TKyZTJAuVhIFbkfFAdLnMR3enLLZi vbYAhTYBDPzDzKq8jjarvqWGF2rdpgsdQ6PLAdxEX3pcW7weoFZCOxYghHuiHpBIGarC 194ftILhxjU/vXIKcSMeU/6VZf0gZH4sXE4mtdhA4mJF2NqUNu/vzzJlb+XG8KsLfYib HWXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=AEr3y3IQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v24si698620ejj.497.2020.09.02.17.25.25; Wed, 02 Sep 2020 17:25:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=AEr3y3IQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727872AbgICASU (ORCPT + 99 others); Wed, 2 Sep 2020 20:18:20 -0400 Received: from mail29.static.mailgun.info ([104.130.122.29]:33955 "EHLO mail29.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727842AbgICASP (ORCPT ); Wed, 2 Sep 2020 20:18:15 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1599092295; h=Content-Transfer-Encoding: MIME-Version: Message-Id: Date: Subject: Cc: To: From: Sender; bh=DWvh/xe4da4kqEIchXLMEtV/mjQkWQ1/j/n7f+uAWvc=; b=AEr3y3IQngtojQD/9sKeDblRfRCDqcEZlaIyUGT0yCirQWTscMT4S/Qx18ZLz2dQumTnFU6M NSiEBzfXWbI/hdUpdBpYnYc9qwRpedHR+vMXIRbP6pQgxLkNVlQF+0UM2Z2vAaNwEjJL6nWj eyveaPbuPhlUhcGVApKh/gmgvkU= X-Mailgun-Sending-Ip: 104.130.122.29 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n07.prod.us-east-1.postgun.com with SMTP id 5f50361aba408b30ce88aad4 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 03 Sep 2020 00:17:30 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id BB160C433A1; Thu, 3 Sep 2020 00:17:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from tingweiz-gv.qualcomm.com (unknown [180.166.53.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: tingwei) by smtp.codeaurora.org (Postfix) with ESMTPSA id 45B37C433C6; Thu, 3 Sep 2020 00:17:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 45B37C433C6 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=tingwei@codeaurora.org From: Tingwei Zhang To: Steven Rostedt , Ingo Molnar , Alexander Shishkin , Maxime Coquelin , Alexandre Torgue Cc: Tingwei Zhang , Mathieu Poirier , Suzuki K Poulose , tsoni@codeaurora.org, Sai Prakash Ranjan , Mao Jinlong , linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 0/6] tracing: export event trace and trace_marker Date: Thu, 3 Sep 2020 08:17:00 +0800 Message-Id: <20200903001706.28147-1-tingwei@codeaurora.org> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ftrace has ability to export trace packets to other destination. Currently, only function trace can be exported. This series extends the support to event trace and trace_maker. STM is one possible destination to export ftrace. Use separate channel for each CPU to avoid mixing up packets from different CPUs together. Change from v2: Change flag definition to BIT(). (Steven) Add comment in stm_ftrace_write() to clarify it's safe to use smp_processor_id() here since preempt is disabled. (Steven) Change from v1: All changes are suggested by Steven Rostedt. User separate flag to control function trace, event trace and trace mark. Allocate channels according to num_possible_cpu() dynamically. Move ftrace_exports routines up so all ftrace can use them. Tingwei Zhang (6): stm class: ftrace: change dependency to TRACING tracing: add flag to control different traces tracing: add trace_export support for event trace tracing: add trace_export support for trace_marker stm class: ftrace: enable supported trace export flag stm class: ftrace: use different channel accroding to CPU drivers/hwtracing/stm/Kconfig | 2 +- drivers/hwtracing/stm/ftrace.c | 7 +- include/linux/trace.h | 7 + kernel/trace/trace.c | 270 ++++++++++++++++++--------------- 4 files changed, 159 insertions(+), 127 deletions(-) -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project