Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1169342ybk; Sun, 10 May 2020 08:14:19 -0700 (PDT) X-Google-Smtp-Source: APiQypJY7d67cVinvfuUsC75Om9gfeuDwj5e6kUsc1yfoBK2xP1jYNh/CLPKrt8LV/pPlc2FglbF X-Received: by 2002:a17:906:a2c9:: with SMTP id by9mr9704111ejb.176.1589123659118; Sun, 10 May 2020 08:14:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589123659; cv=none; d=google.com; s=arc-20160816; b=hS2Ue3ZfGXkGAeUcrntIalH+n2g/TeouX+nYDfQoYuxEzFTAGwxpqhfwAl7QLrg/9U PZsWbsnl94pUHUrITnmyqNQ8z1rSrB6chNXnnuRZNhFeMxhmDU2TWDru6USB7sP2GoeH g9iDlxR8DkU56vOqkrtyLRkQCdq8hJmmckXkpos71LtkiUXwvNrQCWHSrUZGEMIDnyJe ERjtCPZGxRtTP9L+rn0sxIUHCyBgN3EX6MwuKFBTijn8t9bkfOE1HdYrW1t3FfKCnfq5 MNAuRem+b2bwS3Bf7AQ/T+cBsBqu+myDGc3qRmOBc8XOlaV/sM7Q0SW3TL/3Smp2tMMA mtZA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=X0glvZ9Uc9djdHjs6Vrqf3MeDwiLKp7EUlpX6bcp3Fs=; b=WEY7okhVxo9Mnk5gUL+kpJn8octGYptmpP/1qa523xiQEjvbnt738ibcJUaj3a5iWY sbyhgJevv7DGBQBSnXL9N7+fubjc6aFjvZ1iyqGl5MfcyTCLj/3usZgaO7vRYlldObU/ GBBgi55QfiDLpyi56bzEINn5C9aHY7AQOsxuJYJw4DRfvfO+bNhqfBW522aCLO52+cBb 209utxOdzMlMpGiIq5UNtufCbFDwrrkelFvpqeJdskfiay2VtSJMywaL6EslktWlRkO2 KsyV7oNHurbJlMuxokXYOxOYozMBKWI3jRM9zclfFI2wlhxa6RxKEtk4RSQWZAsCCEiz EFeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PUuQsm5q; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id do16si5981522ejc.265.2020.05.10.08.13.55; Sun, 10 May 2020 08:14:19 -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=pass header.i=@gmail.com header.s=20161025 header.b=PUuQsm5q; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729286AbgEJPKN (ORCPT + 99 others); Sun, 10 May 2020 11:10:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728882AbgEJPKN (ORCPT ); Sun, 10 May 2020 11:10:13 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C122C061A0C for ; Sun, 10 May 2020 08:10:13 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id y6so6520044pjc.4 for ; Sun, 10 May 2020 08:10:13 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=X0glvZ9Uc9djdHjs6Vrqf3MeDwiLKp7EUlpX6bcp3Fs=; b=PUuQsm5qKJU9SVQK4BiOIgtnFCk34EQeL7yxv6CETJD28R9vDa+i1y5zDRqmIH9f+/ nsdhAHCUXyJQSvzsSy/i+cbsHnL+w88swfLx5CADQSH7OVTk5384AvZEhFWQiPD41Oe9 66GzzOieyu8UfBNl8rE7K3HwlnDDKXnmIOAFSFwsERn1gDjYJltOEXSl9FkfjnBbKZX3 IwWWDzzi9HoPHqL/NtzzQIt21s/5FY9wPGgt6no0F1L4vv1dSdqHbat/89nnPRku72fI O9vwI4cvTozQsMBkSycGDBpg6x7tZyfQLUXP1oTFJR7i2xcbrcP5SNnn69DrMuXgErg4 +HhA== 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:mime-version:content-transfer-encoding; bh=X0glvZ9Uc9djdHjs6Vrqf3MeDwiLKp7EUlpX6bcp3Fs=; b=EmX6alEoD+rRn6BzLmttrvGc2FETgiZ72kvRN2jmOGrCSI30SDvkL9aVB/d49akeLU qsnlju5eYCoUEyHRBCfBk6ORyShJyRv487Q3S5s4jhwDEA4FsMdygOsnrqq/hlD8Bjz9 6sNtNIJzYH7hpc6fwWGtYomZO3gjVzTMB40WTD2p8p/8m34GD13vYo06jnLsPtikTQbX h7tS5brHZmeoxOPS8SOYmazjYohk0nRVFhX3RXwNwVlkZYLKqPqWgi8XXTHycRcSQ5QQ mQ+/Eto5mttMvysVzoJiKyiR+V5OU3tbsJs+wCr3eQvx/n6ddGOKxlQF70aPIeW8y5L0 v/6g== X-Gm-Message-State: AGi0PuaHQB77alVstBOEdcFvLbaYGK/c/TQRGXEv26afHctkRKYfMg2M SIMXeTxdwGuVRK69as8s1uE= X-Received: by 2002:a17:902:7289:: with SMTP id d9mr11560464pll.147.1589123412987; Sun, 10 May 2020 08:10:12 -0700 (PDT) Received: from vultr.guest ([149.248.10.52]) by smtp.gmail.com with ESMTPSA id v7sm6870909pfm.146.2020.05.10.08.10.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 May 2020 08:10:12 -0700 (PDT) From: Changbin Du To: Jiri Olsa , Arnaldo Carvalho de Melo Cc: Peter Zijlstra , Ingo Molnar , Namhyung Kim , Steven Rostedt , linux-kernel@vger.kernel.org, Changbin Du Subject: [PATCH 16/19] perf ftrace: add option -t/--tid to filter by thread id Date: Sun, 10 May 2020 23:06:25 +0800 Message-Id: <20200510150628.16610-17-changbin.du@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200510150628.16610-1-changbin.du@gmail.com> References: <20200510150628.16610-1-changbin.du@gmail.com> 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 This allows us to trace single thread instead of the whole process. Signed-off-by: Changbin Du --- tools/perf/builtin-ftrace.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c index 0b39b6a88026..8d04e5afe2d3 100644 --- a/tools/perf/builtin-ftrace.c +++ b/tools/perf/builtin-ftrace.c @@ -707,6 +707,8 @@ int cmd_ftrace(int argc, const char **argv) "List available functions to filter"), OPT_STRING('p', "pid", &ftrace.target.pid, "pid", "trace on existing process id"), + OPT_STRING('t', "tid", &ftrace.target.tid, "tid", + "trace on existing thread id (exclusive to --pid)"), OPT_INCR('v', "verbose", &verbose, "be more verbose"), OPT_BOOLEAN('a', "all-cpus", &ftrace.target.system_wide, -- 2.25.1