linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Tom Zanussi <tom.zanussi@linux.intel.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 71/74] perf script: Remove workqueue-stats script
Date: Thu, 24 Jan 2013 17:08:20 -0300	[thread overview]
Message-ID: <1359058103-31645-72-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1359058103-31645-1-git-send-email-acme@infradead.org>

From: Tom Zanussi <tom.zanussi@linux.intel.com>

The tracepoints used by the workqueue-stats script no longer exist so
trying to run the script results in:

  # perf script record workqueue-stats
  invalid or unsupported event: 'workqueue:workqueue_creation'
  Run 'perf list' for a list of valid events

So remove the script until it can be reworked using the new workqueue
tracepoints.

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Link: http://lkml.kernel.org/r/e7a7637d5df9df86887c3bff7683574665ec5360.1358527965.git.tom.zanussi@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/perf-script-python.txt    |   2 -
 tools/perf/scripts/perl/bin/workqueue-stats-record |   2 -
 tools/perf/scripts/perl/bin/workqueue-stats-report |   3 -
 tools/perf/scripts/perl/workqueue-stats.pl         | 129 ---------------------
 4 files changed, 136 deletions(-)
 delete mode 100644 tools/perf/scripts/perl/bin/workqueue-stats-record
 delete mode 100644 tools/perf/scripts/perl/bin/workqueue-stats-report
 delete mode 100644 tools/perf/scripts/perl/workqueue-stats.pl

diff --git a/tools/perf/Documentation/perf-script-python.txt b/tools/perf/Documentation/perf-script-python.txt
index a4027f2..9f1f054 100644
--- a/tools/perf/Documentation/perf-script-python.txt
+++ b/tools/perf/Documentation/perf-script-python.txt
@@ -336,7 +336,6 @@ scripts listed by the 'perf script -l' command e.g.:
 ----
 root@tropicana:~# perf script -l
 List of available trace scripts:
-  workqueue-stats                      workqueue stats (ins/exe/create/destroy)
   wakeup-latency                       system-wide min/max/avg wakeup latency
   rw-by-file <comm>                    r/w activity for a program, by file
   rw-by-pid                            system-wide r/w activity
@@ -402,7 +401,6 @@ should show a new entry for your script:
 ----
 root@tropicana:~# perf script -l
 List of available trace scripts:
-  workqueue-stats                      workqueue stats (ins/exe/create/destroy)
   wakeup-latency                       system-wide min/max/avg wakeup latency
   rw-by-file <comm>                    r/w activity for a program, by file
   rw-by-pid                            system-wide r/w activity
diff --git a/tools/perf/scripts/perl/bin/workqueue-stats-record b/tools/perf/scripts/perl/bin/workqueue-stats-record
deleted file mode 100644
index 8edda90..0000000
--- a/tools/perf/scripts/perl/bin/workqueue-stats-record
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-perf record -e workqueue:workqueue_creation -e workqueue:workqueue_destruction -e workqueue:workqueue_execution -e workqueue:workqueue_insertion $@
diff --git a/tools/perf/scripts/perl/bin/workqueue-stats-report b/tools/perf/scripts/perl/bin/workqueue-stats-report
deleted file mode 100644
index 6d91411..0000000
--- a/tools/perf/scripts/perl/bin/workqueue-stats-report
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-# description: workqueue stats (ins/exe/create/destroy)
-perf script $@ -s "$PERF_EXEC_PATH"/scripts/perl/workqueue-stats.pl
diff --git a/tools/perf/scripts/perl/workqueue-stats.pl b/tools/perf/scripts/perl/workqueue-stats.pl
deleted file mode 100644
index a8eaff5..0000000
--- a/tools/perf/scripts/perl/workqueue-stats.pl
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/usr/bin/perl -w
-# (c) 2009, Tom Zanussi <tzanussi@gmail.com>
-# Licensed under the terms of the GNU GPL License version 2
-
-# Displays workqueue stats
-#
-# Usage:
-#
-#   perf record -c 1 -f -a -R -e workqueue:workqueue_creation -e
-#     workqueue:workqueue_destruction -e workqueue:workqueue_execution
-#     -e workqueue:workqueue_insertion
-#
-#   perf script -p -s tools/perf/scripts/perl/workqueue-stats.pl
-
-use 5.010000;
-use strict;
-use warnings;
-
-use lib "$ENV{'PERF_EXEC_PATH'}/scripts/perl/Perf-Trace-Util/lib";
-use lib "./Perf-Trace-Util/lib";
-use Perf::Trace::Core;
-use Perf::Trace::Util;
-
-my @cpus;
-
-sub workqueue::workqueue_destruction
-{
-    my ($event_name, $context, $common_cpu, $common_secs, $common_nsecs,
-	$common_pid, $common_comm,
-	$thread_comm, $thread_pid) = @_;
-
-    $cpus[$common_cpu]{$thread_pid}{destroyed}++;
-    $cpus[$common_cpu]{$thread_pid}{comm} = $thread_comm;
-}
-
-sub workqueue::workqueue_creation
-{
-    my ($event_name, $context, $common_cpu, $common_secs, $common_nsecs,
-	$common_pid, $common_comm,
-	$thread_comm, $thread_pid, $cpu) = @_;
-
-    $cpus[$common_cpu]{$thread_pid}{created}++;
-    $cpus[$common_cpu]{$thread_pid}{comm} = $thread_comm;
-}
-
-sub workqueue::workqueue_execution
-{
-    my ($event_name, $context, $common_cpu, $common_secs, $common_nsecs,
-	$common_pid, $common_comm,
-	$thread_comm, $thread_pid, $func) = @_;
-
-    $cpus[$common_cpu]{$thread_pid}{executed}++;
-    $cpus[$common_cpu]{$thread_pid}{comm} = $thread_comm;
-}
-
-sub workqueue::workqueue_insertion
-{
-    my ($event_name, $context, $common_cpu, $common_secs, $common_nsecs,
-	$common_pid, $common_comm,
-	$thread_comm, $thread_pid, $func) = @_;
-
-    $cpus[$common_cpu]{$thread_pid}{inserted}++;
-    $cpus[$common_cpu]{$thread_pid}{comm} = $thread_comm;
-}
-
-sub trace_end
-{
-    print "workqueue work stats:\n\n";
-    my $cpu = 0;
-    printf("%3s %6s %6s\t%-20s\n", "cpu", "ins", "exec", "name");
-    printf("%3s %6s %6s\t%-20s\n", "---", "---", "----", "----");
-    foreach my $pidhash (@cpus) {
-	while ((my $pid, my $wqhash) = each %$pidhash) {
-	    my $ins = $$wqhash{'inserted'} || 0;
-	    my $exe = $$wqhash{'executed'} || 0;
-	    my $comm = $$wqhash{'comm'} || "";
-	    if ($ins || $exe) {
-		printf("%3u %6u %6u\t%-20s\n", $cpu, $ins, $exe, $comm);
-	    }
-	}
-	$cpu++;
-    }
-
-    $cpu = 0;
-    print "\nworkqueue lifecycle stats:\n\n";
-    printf("%3s %6s %6s\t%-20s\n", "cpu", "created", "destroyed", "name");
-    printf("%3s %6s %6s\t%-20s\n", "---", "-------", "---------", "----");
-    foreach my $pidhash (@cpus) {
-	while ((my $pid, my $wqhash) = each %$pidhash) {
-	    my $created = $$wqhash{'created'} || 0;
-	    my $destroyed = $$wqhash{'destroyed'} || 0;
-	    my $comm = $$wqhash{'comm'} || "";
-	    if ($created || $destroyed) {
-		printf("%3u %6u %6u\t%-20s\n", $cpu, $created, $destroyed,
-		       $comm);
-	    }
-	}
-	$cpu++;
-    }
-
-    print_unhandled();
-}
-
-my %unhandled;
-
-sub print_unhandled
-{
-    if ((scalar keys %unhandled) == 0) {
-	return;
-    }
-
-    print "\nunhandled events:\n\n";
-
-    printf("%-40s  %10s\n", "event", "count");
-    printf("%-40s  %10s\n", "----------------------------------------",
-	   "-----------");
-
-    foreach my $event_name (keys %unhandled) {
-	printf("%-40s  %10d\n", $event_name, $unhandled{$event_name});
-    }
-}
-
-sub trace_unhandled
-{
-    my ($event_name, $context, $common_cpu, $common_secs, $common_nsecs,
-	$common_pid, $common_comm) = @_;
-
-    $unhandled{$event_name}++;
-}
-- 
1.8.1.1.361.gec3ae6e


  parent reply	other threads:[~2013-01-24 20:19 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1359058103-31645-1-git-send-email-acme@infradead.org>
2013-01-24 20:07 ` [PATCH 01/74] perf hists: Exchange order of comparing items when collapsing hists Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 02/74] perf hists: Link hist entries before inserting to an output tree Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 03/74] perf diff: Use internal rb tree for compute resort Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 04/74] perf test: Add a test case for hists__{match,link} Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 05/74] perf test: Remove leftover temp file left by one of the attr tests Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 06/74] perf tests: Adjust some message log levels to help diagnosing problems in " Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 07/74] perf evsel: Do missing feature fallbacks in just one place Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 08/74] perf evsel: Introduce event fallback method Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 09/74] perf evsel: Introduce perf_evsel__open_strerror method Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 10/74] perf test: Check for linking problems in the python binding Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 11/74] perf python: Fix breakage introduced by the test_attr infrastructure Arnaldo Carvalho de Melo
2013-01-29  4:06   ` Thomas Backlund
2013-01-24 20:07 ` [PATCH 12/74] perf tools: Add missing closedir in multi tracepoint processing Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 13/74] perf tools: Add support for wildcard in tracepoint system name Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 14/74] perf tests: Add event parsing test for '*:*' tracepoints Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 15/74] perf tests: Check python path on attr and binding test Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 16/74] perf header: Ensure read/write finished successfully Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 17/74] perf record: Don't pass host machine to guest synthesizer Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 18/74] perf hists: Rename hists__fprintf_nr_events to events_stats__fprintf Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 19/74] perf session: There is no need for a per session hists instance Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 20/74] perf machine: Introduce struct machines Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 21/74] perf tests: Fix PYTHONPATH for python-use test tracepoints Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 22/74] perf machine: Simplify accessing the host machine Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 23/74] perf kvm: Initialize file_name var to fix segfault Arnaldo Carvalho de Melo
2013-01-25  3:00   ` Xiao Guangrong
2013-01-24 20:07 ` [PATCH 24/74] perf tests: Add return states enum for tests Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 25/74] perf tests: Don't fail if a matching vmlinux isn't found, skip that test Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 26/74] perf tools: remove redundant checks from _sort__sym_cmp Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 27/74] perf kmem: use ARRAY_SIZE instead of reinventing it Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 28/74] perf script: " Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 29/74] uprobes: remove redundant check Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 30/74] perf ui/gtk: Factor out common browser routines Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 31/74] perf ui/gtk: Setup browser window early Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 32/74] tools lib traceevent: test correct variable after allocation Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 33/74] tools lib traceevent: Update FSF postal address to be URL's Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 34/74] tools lib traceevent: Add copyright header Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 35/74] perf tools: Fix GNU make v3.80 compatibility issue Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 36/74] perf tools: Fix possible (unlikely) buffer overflow Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 37/74] perf symbols: Include elf.h header regardless LIBELF_SUPPORT Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 38/74] perf bench: Flush stdout before starting bench suite Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 39/74] perf tools: Add anonymous huge page recognition Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 40/74] perf: Missing field in PERF_RECORD_SAMPLE documentation Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 41/74] perf probe: Allow of casting an array of char to string Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 42/74] perf sort: Move misplaced sort entry functions Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 43/74] perf sort: Get rid of unnecessary __maybe_unused Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 44/74] perf sort: Fix --sort pid output Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 45/74] perf sort: Align cpu column to right Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 46/74] perf sort: Calculate parent column width too Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 47/74] perf sort: Clean up sort__first_dimension setting Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 48/74] perf sort: Separate out branch stack specific sort keys Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 49/74] perf report: Update documentation for " Arnaldo Carvalho de Melo
2013-01-24 20:07 ` [PATCH 50/74] perf symbols: Move name malloc to when needed in dso__load Arnaldo Carvalho de Melo
2013-01-24 20:08 ` [PATCH 51/74] perf symbols: Mark vmlinux filename as allocated Arnaldo Carvalho de Melo
2013-01-24 20:08 ` [PATCH 52/74] perf tools: Move get_term_dimensions from top to util.c Arnaldo Carvalho de Melo
2013-01-24 20:08 ` [PATCH 53/74] perf annotate browser: Fix segfault when drawing out-of-bounds jumps Arnaldo Carvalho de Melo
2013-01-24 20:08 ` [PATCH 54/74] perf tools: Mark branch_info maps as referenced Arnaldo Carvalho de Melo
2013-01-24 20:08 ` [PATCH 55/74] perf tools: Remove unused 'unset' parameter from parse_events Arnaldo Carvalho de Melo
2013-01-24 20:08 ` [PATCH 56/74] tools lib traceevent: Fix warning on '>=' operator Arnaldo Carvalho de Melo
2013-01-24 20:08 ` [PATCH 57/74] perf tools: Get rid of unused include of config.mak Arnaldo Carvalho de Melo
2013-01-24 20:08 ` [PATCH 58/74] perf tools: Do not include PERF-VERSION-FILE to Makefile Arnaldo Carvalho de Melo
2013-01-24 20:08 ` [PATCH 59/74] perf tools: Fix PMU format parsing test failure Arnaldo Carvalho de Melo
2013-01-24 20:08 ` [PATCH 60/74] perf tools: Move ltrim() to util/string.c Arnaldo Carvalho de Melo
2013-01-24 20:08 ` [PATCH 61/74] perf tools: Fix usage of __ in parse_events_term struct Arnaldo Carvalho de Melo
2013-01-24 20:08 ` [PATCH 62/74] perf pmu: Fix usage of __ in struct names Arnaldo Carvalho de Melo
2013-01-24 20:08 ` [PATCH 63/74] perf ui browsers: " Arnaldo Carvalho de Melo
2013-01-24 20:08 ` [PATCH 64/74] perf tools: Fix usage of __ in event parsing " Arnaldo Carvalho de Melo
2013-01-24 20:08 ` [PATCH 65/74] perf tests: Use ARRAY_SIZE() were applicable Arnaldo Carvalho de Melo
2013-01-24 20:08 ` [PATCH 66/74] perf pmu: Privatize perf_pmu_{format,alias} structs Arnaldo Carvalho de Melo
2013-01-24 20:08 ` [PATCH 67/74] perf tools: Remove some needless die() calls from the main routine Arnaldo Carvalho de Melo
2013-01-24 20:08 ` [PATCH 68/74] perf tools: Reinstate 'signed' field flag for tracepoints Arnaldo Carvalho de Melo
2013-01-24 20:08 ` [PATCH 69/74] perf script: Don't display trace info when invoking scripts Arnaldo Carvalho de Melo
2013-01-24 20:08 ` [PATCH 70/74] perf script: hook up perf_scripting_context->pevent Arnaldo Carvalho de Melo
2013-01-24 20:08 ` Arnaldo Carvalho de Melo [this message]
2013-01-24 20:08 ` [PATCH 72/74] perf tools: Allow passing NULL to intlist__find Arnaldo Carvalho de Melo
2013-01-24 20:08 ` [PATCH 73/74] perf tools: Allow passing a list to intlist__new Arnaldo Carvalho de Melo
2013-01-24 20:08 ` [PATCH 74/74] perf test: Allow skipping tests Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1359058103-31645-72-git-send-email-acme@infradead.org \
    --to=acme@infradead.org \
    --cc=acme@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tom.zanussi@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).