Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2203284imm; Thu, 27 Sep 2018 09:00:44 -0700 (PDT) X-Google-Smtp-Source: ACcGV62oVUF7hceTeptahGdLaaeqTlioZjySACX+1AZBh5qabOtTLsuy2XdAVDoD1FBXQuGqbTcJ X-Received: by 2002:a17:902:2e01:: with SMTP id q1-v6mr11868672plb.40.1538064044083; Thu, 27 Sep 2018 09:00:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538064044; cv=none; d=google.com; s=arc-20160816; b=I7Q+f9a3JpB+GGfHpnTm2DFrzK8p7cmP6BZe9sdbzGpE6wVixWWJe+wVJMwcV9bKif luZffA6VU9dZdm1eazXbkPbNdoJ1FniWKY7JpSD6Ipa7M4G4AJHNiPNsLzasbEbfJZRx /wGnQ5RvKmCH5HxMZYhew00ycngoGcJm3pOuKm3bEU1JcfetJaOK6QM4S91O+WSoFFRZ tDSvESyBW8OB7oHdB696FGtbNNyvoyeiIAlghPEX5CuFWNgYAsZb40MzvyhThZ1BFUT9 V1zS1D7muxaxkAYeE/5zjr1GAe0L+HIdgsiRQZOekdfhKjpw1jd4OzNX/L60W4mqz79G 7XnA== 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 :user-agent:message-id:date:subject:cc:to:from:dkim-signature; bh=p05pOXjBz/v1bSVrI2hzcNqIiVRBYlTWzKOGSs0uk0w=; b=QwcmftJ8KqtLK/u4bjAoGKFTVUgmhnwbDG81uNeSEgz0eiLSi9DvTjNwO3j2G/4Jcx 57ZIKVmU8U2dSkMh0uNicw5DHayAWxu0gPG/KDXzuH1GyLzIM39OvrknvwIe9apMSEvw eqvoVtygx7VffT/f2Dhu/AxP+/SEA+taVEXRxOwvo4Kas8dziDrbDJk3AV9JHIF81vZR n9foGAkjG9zmH1xQ5fzAsWsRK3yF0ynYvoJTYI5g8ZRNNLE+21ImwmECpM8JRmCv26H/ v4gF+1E5CtQgwXh6pvZi9tDG1tJQzb9gCbVlsQPNDCl5DuCHlCzLSEUyHv7gKH2hYxsZ 6r7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="hd/H3pZl"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l1-v6si2204918pld.184.2018.09.27.09.00.27; Thu, 27 Sep 2018 09:00:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="hd/H3pZl"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727541AbeI0WRx (ORCPT + 99 others); Thu, 27 Sep 2018 18:17:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:38162 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727262AbeI0WRw (ORCPT ); Thu, 27 Sep 2018 18:17:52 -0400 Received: from localhost.localdomain (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8D10021571; Thu, 27 Sep 2018 15:58:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1538063937; bh=r6nZliiHZmFeIbL0Ct6kZozfeyDGfPW2Vgv9pFrkKNU=; h=From:To:Cc:Subject:Date:From; b=hd/H3pZl0o5JQ9GbdfCcPgN9vGBaCHlroJ1OFvs5sXhsLzZ2EJxDajMUBrHRWC+xL uotT4zrYEKVXpGIQS8SycQl9QdUzFVRCXGx11EqNxp25v11lUwUH9rgEmvzcateaXg CKQ3M2canP0JbFwnjG2QZ1orb1xCvMrsnC7Bq5QQ= From: Masami Hiramatsu To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Tom Zanussi , Ravi Bangoria Subject: [RFC PATCH 0/5] tracing: Unifying dynamic event interface Date: Fri, 28 Sep 2018 00:58:33 +0900 Message-Id: <153806391326.18458.3927382953014694981.stgit@devbox> X-Mailer: git-send-email 2.13.6 User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This is an RFC series of unifying dynamic event interface on ftrace. Currently ftrace has 3 dynamic event interfaces, kprobes, uprobes and synthetic. This series unifies kprobes and uprobes event interface on "dynamic_events". This enables us to add new dynamic events easily on same interface, e.g. function events. The older interfaces are left on the tracefs for backward compatibility at this moment. dynamic_events syntax has no different from kprobe_events and uprobe_events. You can use same syntax for dynamic_events interface. I think we can integrate synthetic events to this dynamic_events interface but it will requires new syntax. e.g. echo "s: " >> dynamic_events If it is OK, I'll add it in next version. BTW, since this dynamic_events interface derived from *probe_events, it inherits "all clear when truncate file open" behavior. But if you think this is too aggressive, I can drop it. (even in that case, kprobe_events/uprobe_events behavior is not changed) I also introduced a widely used way to erase entries in other interfaces of ftrace, that is '!'. So you can now use '!event-name' or '!group/event' to erase an entry in dynamic_events. (Wait... it has to be '!p:event' as others do??) Any thought? Thank you, --- Masami Hiramatsu (5): tracing/uprobes: Add busy check when cleanup all uprobes tracing: Add a unified dynamic event framework tracing/kprobes: Use dyn_event framework for kprobe events tracing/uprobes: Use dyn_event framework for uprobe events tracing: Add generic event-name based remove event method Documentation/trace/kprobetrace.rst | 3 + Documentation/trace/uprobetracer.rst | 4 + kernel/trace/Kconfig | 4 + kernel/trace/Makefile | 1 kernel/trace/trace.c | 4 + kernel/trace/trace_dynevent.c | 183 +++++++++++++++++++++++++++++++++ kernel/trace/trace_dynevent.h | 89 ++++++++++++++++ kernel/trace/trace_kprobe.c | 191 +++++++++++++++++++++++----------- kernel/trace/trace_uprobe.c | 175 +++++++++++++++++++++++-------- 9 files changed, 547 insertions(+), 107 deletions(-) create mode 100644 kernel/trace/trace_dynevent.c create mode 100644 kernel/trace/trace_dynevent.h -- Masami Hiramatsu (Linaro)