From patchwork Fri Aug 2 11:00:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Tzvetomir Stoyanov (VMware)" X-Patchwork-Id: 11073175 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5B8341399 for ; Fri, 2 Aug 2019 11:01:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 44EB028451 for ; Fri, 2 Aug 2019 11:01:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37638286F3; Fri, 2 Aug 2019 11:01:08 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD28F286DA for ; Fri, 2 Aug 2019 11:01:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729493AbfHBLBH (ORCPT ); Fri, 2 Aug 2019 07:01:07 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:54634 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729430AbfHBLBH (ORCPT ); Fri, 2 Aug 2019 07:01:07 -0400 Received: by mail-wm1-f68.google.com with SMTP id p74so67507984wme.4 for ; Fri, 02 Aug 2019 04:01:05 -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:mime-version :content-transfer-encoding; bh=CB/VEzv5MeTRH5BLAlLjRJrdUvPpTf1WvB41du/bduA=; b=Pt1pHu0rAK7PcuTjoPyx6XBfNjDgseTfHe7PaltnzGnG+zZeZYU9m2JWMxDajahfDL QIMKzSQpeNPDEwSgUY6ABZ/Mu6jwyKDhZ5y9iolK0OAUNy7sizGJAhB7marne1FILxX0 ipkaMcFTJ5i+4NDaBgL3s7WcapxIMjKWDa9Gs5l/Lsd7dJTBayKgtUk1pXEtiXhunQnV 7y7OWKbTXYBz72DSiPKnIHBGLOnKvxaSZHX+hXFkbplVY97cgPEh59a9WmiB4j+kc7w4 kCqY+BlpJWHgKYRacax5t13Ab1RQArxyJ6LkW8aMqmHsEzOO/U8pXTuioxUJMXenX7Zu Lx3Q== 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:mime-version :content-transfer-encoding; bh=CB/VEzv5MeTRH5BLAlLjRJrdUvPpTf1WvB41du/bduA=; b=Dt/85p1gYRXde8WzVe2KZgXegCfKPm71SrpDKiNYP43HYqsxoPBY4/sFkEMahBfoWt 4fVibhiHGL3NHd5s5obzbtHCJsXcZQcV5YnvWde+wo43AZxmOGdfnXSZZYexmv952plD /No0jCKeua+2SsOUNfpeoY2sdohDWEpi7bHMCQhm8HCo1nbq9f4vqAQg7creREFq9Me+ e04Bexdc/eIynikZWOzkvb5f02LB3mVdEO7MAWxEWWyigJ0ThGTVLHcQ3H6ZlrOKZyNz CoMfkr7rMpq4BTW/BOLWNqBDkDIXDt02Yu8SJosPvu3VLsEgnJgfMShV5r044lNTsAux dlTQ== X-Gm-Message-State: APjAAAVr2x9VV1ElPprW8BH+mus92Uxj9RUNHTLpIgG9C6C3wGkSDi2v 25GIGi6ExQW5N5uqAPcCWdSiNdXKB1E= X-Google-Smtp-Source: APXvYqwxcP5MkWOCaAMs0ifP+Ig7CLVXemBzCNnADKvFF1jmSzouTpgzd1txUZpsKVdt1j7SUx4mww== X-Received: by 2002:a7b:cd94:: with SMTP id y20mr4285197wmj.94.1564743664882; Fri, 02 Aug 2019 04:01:04 -0700 (PDT) Received: from oberon.eng.vmware.com ([146.247.46.5]) by smtp.gmail.com with ESMTPSA id r15sm79511433wrj.68.2019.08.02.04.01.02 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 02 Aug 2019 04:01:03 -0700 (PDT) From: "Tzvetomir Stoyanov (VMware)" To: rostedt@goodmis.org Cc: linux-trace-devel@vger.kernel.org Subject: [PATCH v2 0/6] Remove redundant trace-cmd plugin handling logic Date: Fri, 2 Aug 2019 14:00:55 +0300 Message-Id: <20190802110101.14759-1-tz.stoyanov@gmail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Sender: linux-trace-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently there are no trace-cmd related plugins, all of them are designed to be used with libtraceeevnt. As both libtraceevent and trace-cmd have logic for managing plugins, the one in trace-cmd is redundant. Those redundant code is removed and replaced with calls to libtraceeevnt plugin APIs. When trace-cmd has to load any plugins, it uses libtraceeevnt to do the job. All existing plugins are moved from plugins/ to plugins/traceevent/ directory, as all of them (except plugin_python) are designed to be used with the traceevent library. This change paves the way for implementing trace-cmd specific plugins. Tzvetomir Stoyanov (VMware) (1): trace-cmd: Remove trace-cmd plugin handling routines Tzvetomir Stoyanov (1): trace-cmd: Change plugin install directories Tzvetomir Stoyanov (VMware) (4): trace-cmd: Move kernel_stack event handler to "function" plugin. trace-cmd: Move plugin options from trace-cmd to libtraceevent. trace-cmd: Move libtraceevent plugins in its own directory. trace-cmd: Load libtraceevent plugins from build folder, if exists. .gitignore | 2 +- Makefile | 44 +- include/trace-cmd/trace-cmd.h | 24 - include/traceevent/event-parse.h | 8 + kernel-shark/src/libkshark.c | 4 +- lib/trace-cmd/Makefile | 2 - lib/trace-cmd/trace-ftrace.c | 56 +- lib/trace-cmd/trace-input.c | 9 +- lib/trace-cmd/trace-util.c | 752 +----------------- lib/traceevent/event-plugin.c | 226 +++++- plugins/{ => traceevent}/Makefile | 12 +- plugins/{ => traceevent}/plugin_blk.c | 0 plugins/{ => traceevent}/plugin_cfg80211.c | 0 plugins/{ => traceevent}/plugin_function.c | 45 +- plugins/{ => traceevent}/plugin_futex.c | 0 plugins/{ => traceevent}/plugin_hrtimer.c | 0 plugins/{ => traceevent}/plugin_jbd2.c | 0 plugins/{ => traceevent}/plugin_kmem.c | 0 plugins/{ => traceevent}/plugin_kvm.c | 0 plugins/{ => traceevent}/plugin_mac80211.c | 0 plugins/{ => traceevent}/plugin_python.c | 9 +- .../{ => traceevent}/plugin_sched_switch.c | 0 plugins/{ => traceevent}/plugin_scsi.c | 0 plugins/{ => traceevent}/plugin_tlb.c | 0 plugins/{ => traceevent}/plugin_xen.c | 0 tracecmd/trace-check-events.c | 10 +- tracecmd/trace-list.c | 23 +- tracecmd/trace-read.c | 2 +- 28 files changed, 338 insertions(+), 890 deletions(-) rename plugins/{ => traceevent}/Makefile (86%) rename plugins/{ => traceevent}/plugin_blk.c (100%) rename plugins/{ => traceevent}/plugin_cfg80211.c (100%) rename plugins/{ => traceevent}/plugin_function.c (79%) rename plugins/{ => traceevent}/plugin_futex.c (100%) rename plugins/{ => traceevent}/plugin_hrtimer.c (100%) rename plugins/{ => traceevent}/plugin_jbd2.c (100%) rename plugins/{ => traceevent}/plugin_kmem.c (100%) rename plugins/{ => traceevent}/plugin_kvm.c (100%) rename plugins/{ => traceevent}/plugin_mac80211.c (100%) rename plugins/{ => traceevent}/plugin_python.c (91%) rename plugins/{ => traceevent}/plugin_sched_switch.c (100%) rename plugins/{ => traceevent}/plugin_scsi.c (100%) rename plugins/{ => traceevent}/plugin_tlb.c (100%) rename plugins/{ => traceevent}/plugin_xen.c (100%)