Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1204556 > unrolled thread

[GIT PULL 0/9] perf/core improvements and fixes

Started byArnaldo Carvalho de Melo <acme@kernel.org>
First post2015-08-10 23:00 +0200
Last post2015-08-12 12:20 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [GIT PULL 0/9] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-10 23:00 +0200
    [PATCH 6/9] perf hists: Update the column width for the "srcline" sort key Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-10 23:10 +0200
    Re: [GIT PULL 0/9] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2015-08-12 12:20 +0200

#1204556 — [GIT PULL 0/9] perf/core improvements and fixes

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2015-08-10 23:00 +0200
Subject[GIT PULL 0/9] perf/core improvements and fixes
Message-ID<pW2kO-Ga-3@gated-at.bofh.it>
Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit f1d800bf615b84ca253af372d2dac8cdef743a20:

  Merge tag 'perf-ebpf-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-08-08 10:05:17 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo

for you to fetch changes up to 4605bb55b91449a1a953a51f0334d3bc02351adb:

  perf evlist: Be more specific on -F/--freq (2015-08-10 17:20:26 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

User visible:

- Introduce 'srcfile' sort key: (Andi Kleen)

  # perf record -F 10000 usleep 1
  # perf report --stdio --dsos '[kernel.vmlinux]' -s srcfile
  <SNIP>
  # Overhead  Source File
      26.49%  copy_page_64.S
       5.49%  signal.c
       0.51%  msr.h
  #

  It can be combined with other fields, for instance, experiment with
  '-s srcfile,symbol'.

  There are some oddities in some distros and with some specific DSOs, being
  investigated, so your mileage may vary.

- Update the column width for the "srcline" sort key (Arnaldo Carvalho de Melo)

- Support per-event 'freq' term: (Namhyung Kim)

  $ perf record -e 'cpu/instructions,freq=1234/',cycles -c 1000 sleep 1
  $ perf evlist -F
  cpu/instructions,freq=1234/: sample_freq=1234
  cycles: sample_period=1000
  $

Infrastructure:

- Move perf_counts struct and functions into separate object (Jiri Olsa)

- Unset perf_event_attr::freq when period term is set (Jiri Olsa)

- Move callchain option parsing code to util.c (Kan Liang)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Andi Kleen (2):
      perf tools: Support full source file paths for srcline
      perf report: Add support for srcfile sort key

Arnaldo Carvalho de Melo (2):
      perf hists: hist_entry__cmp() may use he_tmp.hists, initialize it
      perf hists: Update the column width for the "srcline" sort key

Jiri Olsa (2):
      perf stat: Move perf_counts struct and functions into separate object
      perf tools: Unset perf_event_attr::freq when period term is set

Kan Liang (1):
      perf callchain: Move option parsing code to util.c

Namhyung Kim (2):
      perf record: Support per-event freq term
      perf evlist: Be more specific on -F/--freq

 tools/perf/Documentation/perf-record.txt |  1 +
 tools/perf/Documentation/perf-report.txt |  4 ++
 tools/perf/Documentation/perf-script.txt |  3 ++
 tools/perf/builtin-report.c              |  2 +
 tools/perf/builtin-script.c              |  2 +
 tools/perf/builtin-stat.c                |  1 +
 tools/perf/util/Build                    |  1 +
 tools/perf/util/callchain.c              | 89 +------------------------------
 tools/perf/util/callchain.h              |  1 +
 tools/perf/util/counts.c                 | 52 ++++++++++++++++++
 tools/perf/util/counts.h                 | 37 +++++++++++++
 tools/perf/util/evsel.c                  | 14 ++++-
 tools/perf/util/evsel.h                  |  4 +-
 tools/perf/util/hist.c                   |  9 ++++
 tools/perf/util/hist.h                   |  1 +
 tools/perf/util/parse-events.c           |  6 +++
 tools/perf/util/parse-events.h           |  1 +
 tools/perf/util/parse-events.l           |  1 +
 tools/perf/util/pmu.c                    |  2 +-
 tools/perf/util/python-ext-sources       |  2 +-
 tools/perf/util/sort.c                   | 52 ++++++++++++++++++
 tools/perf/util/sort.h                   |  2 +
 tools/perf/util/srcline.c                |  6 ++-
 tools/perf/util/stat.c                   | 49 -----------------
 tools/perf/util/stat.h                   | 30 -----------
 tools/perf/util/util.c                   | 90 ++++++++++++++++++++++++++++++++
 tools/perf/util/util.h                   |  3 ++
 27 files changed, 292 insertions(+), 173 deletions(-)
 create mode 100644 tools/perf/util/counts.c
 create mode 100644 tools/perf/util/counts.h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1204566 — [PATCH 6/9] perf hists: Update the column width for the "srcline" sort key

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2015-08-10 23:10 +0200
Subject[PATCH 6/9] perf hists: Update the column width for the "srcline" sort key
Message-ID<pW2uw-16K-43@gated-at.bofh.it>
In reply to#1204556
From: Arnaldo Carvalho de Melo <acme@redhat.com>

When we introduce a new sort key, we need to update the
hists__calc_col_len() function accordingly, otherwise the width
will be limited to strlen(header).

We can't update it when obtaining a line value for a column (for
instance, in sort__srcline_cmp()), because we reset it all when doing a
resort (see hists__output_recalc_col_len()), so we need to, from what is
in the hist_entry fields, set each of the column widths.

Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Fixes: 409a8be61560 ("perf tools: Add sort by src line/number")
Link: http://lkml.kernel.org/n/tip-jgbe0yx8v1gs89cslr93pvz2@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/hist.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 2fe6ea39e257..608c0a7fd0f4 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -151,6 +151,9 @@ void hists__calc_col_len(struct hists *hists, struct hist_entry *h)
 	hists__new_col_len(hists, HISTC_LOCAL_WEIGHT, 12);
 	hists__new_col_len(hists, HISTC_GLOBAL_WEIGHT, 12);
 
+	if (h->srcline)
+		hists__new_col_len(hists, HISTC_SRCLINE, strlen(h->srcline));
+
 	if (h->transaction)
 		hists__new_col_len(hists, HISTC_TRANSACTION,
 				   hist_entry__transaction_len());
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1205899

FromIngo Molnar <mingo@kernel.org>
Date2015-08-12 12:20 +0200
Message-ID<pWBiz-1oV-59@gated-at.bofh.it>
In reply to#1204556
* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit f1d800bf615b84ca253af372d2dac8cdef743a20:
> 
>   Merge tag 'perf-ebpf-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-08-08 10:05:17 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
> 
> for you to fetch changes up to 4605bb55b91449a1a953a51f0334d3bc02351adb:
> 
>   perf evlist: Be more specific on -F/--freq (2015-08-10 17:20:26 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Introduce 'srcfile' sort key: (Andi Kleen)
> 
>   # perf record -F 10000 usleep 1
>   # perf report --stdio --dsos '[kernel.vmlinux]' -s srcfile
>   <SNIP>
>   # Overhead  Source File
>       26.49%  copy_page_64.S
>        5.49%  signal.c
>        0.51%  msr.h
>   #
> 
>   It can be combined with other fields, for instance, experiment with
>   '-s srcfile,symbol'.
> 
>   There are some oddities in some distros and with some specific DSOs, being
>   investigated, so your mileage may vary.
> 
> - Update the column width for the "srcline" sort key (Arnaldo Carvalho de Melo)
> 
> - Support per-event 'freq' term: (Namhyung Kim)
> 
>   $ perf record -e 'cpu/instructions,freq=1234/',cycles -c 1000 sleep 1
>   $ perf evlist -F
>   cpu/instructions,freq=1234/: sample_freq=1234
>   cycles: sample_period=1000
>   $
> 
> Infrastructure:
> 
> - Move perf_counts struct and functions into separate object (Jiri Olsa)
> 
> - Unset perf_event_attr::freq when period term is set (Jiri Olsa)
> 
> - Move callchain option parsing code to util.c (Kan Liang)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Andi Kleen (2):
>       perf tools: Support full source file paths for srcline
>       perf report: Add support for srcfile sort key
> 
> Arnaldo Carvalho de Melo (2):
>       perf hists: hist_entry__cmp() may use he_tmp.hists, initialize it
>       perf hists: Update the column width for the "srcline" sort key
> 
> Jiri Olsa (2):
>       perf stat: Move perf_counts struct and functions into separate object
>       perf tools: Unset perf_event_attr::freq when period term is set
> 
> Kan Liang (1):
>       perf callchain: Move option parsing code to util.c
> 
> Namhyung Kim (2):
>       perf record: Support per-event freq term
>       perf evlist: Be more specific on -F/--freq
> 
>  tools/perf/Documentation/perf-record.txt |  1 +
>  tools/perf/Documentation/perf-report.txt |  4 ++
>  tools/perf/Documentation/perf-script.txt |  3 ++
>  tools/perf/builtin-report.c              |  2 +
>  tools/perf/builtin-script.c              |  2 +
>  tools/perf/builtin-stat.c                |  1 +
>  tools/perf/util/Build                    |  1 +
>  tools/perf/util/callchain.c              | 89 +------------------------------
>  tools/perf/util/callchain.h              |  1 +
>  tools/perf/util/counts.c                 | 52 ++++++++++++++++++
>  tools/perf/util/counts.h                 | 37 +++++++++++++
>  tools/perf/util/evsel.c                  | 14 ++++-
>  tools/perf/util/evsel.h                  |  4 +-
>  tools/perf/util/hist.c                   |  9 ++++
>  tools/perf/util/hist.h                   |  1 +
>  tools/perf/util/parse-events.c           |  6 +++
>  tools/perf/util/parse-events.h           |  1 +
>  tools/perf/util/parse-events.l           |  1 +
>  tools/perf/util/pmu.c                    |  2 +-
>  tools/perf/util/python-ext-sources       |  2 +-
>  tools/perf/util/sort.c                   | 52 ++++++++++++++++++
>  tools/perf/util/sort.h                   |  2 +
>  tools/perf/util/srcline.c                |  6 ++-
>  tools/perf/util/stat.c                   | 49 -----------------
>  tools/perf/util/stat.h                   | 30 -----------
>  tools/perf/util/util.c                   | 90 ++++++++++++++++++++++++++++++++
>  tools/perf/util/util.h                   |  3 ++
>  27 files changed, 292 insertions(+), 173 deletions(-)
>  create mode 100644 tools/perf/util/counts.c
>  create mode 100644 tools/perf/util/counts.h

Pulled, thanks a lot Arnaldo!

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web