Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1382648 > unrolled thread
| Started by | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| First post | 2016-04-19 18:00 +0200 |
| Last post | 2016-04-19 21:10 +0200 |
| Articles | 6 — 2 participants |
Back to article view | Back to linux.kernel
[GIT PULL 00/14] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-04-19 18:00 +0200
[PATCH 08/14] perf top: Use callchain_param.enabled instead of symbol_conf.use_callchain Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-04-19 18:00 +0200
[PATCH 09/14] perf script: Fix postgresql ubuntu install instructions Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-04-19 18:00 +0200
[PATCH 10/14] perf jit: memset() variable 'st' using the correct size Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-04-19 18:00 +0200
[PATCH 05/14] perf report: Use callchain_param.enabled instead of tool specific knob Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-04-19 18:00 +0200
Re: [GIT PULL 00/14] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2016-04-19 21:10 +0200
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-04-19 18:00 +0200 |
| Subject | [GIT PULL 00/14] perf/core improvements and fixes |
| Message-ID | <rpGee-KT-7@gated-at.bofh.it> |
Hi Ingo,
Please consider pulling,
- Arnaldo
The following changes since commit 9243ae5b28d02dc7d71a4f00c981ef6feaede3f1:
Merge tag 'perf-core-for-mingo-20160415' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-04-16 11:09:57 +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-20160419
for you to fetch changes up to 6566feafb4dba4eef30a9c0b25e6f49f996178b6:
perf test: Add missing verbose output explaining the reason for failure (2016-04-19 12:39:36 -0300)
----------------------------------------------------------------
perf/core improvements and fixes:
Build fixes:
- Fix 'perf trace' build when DWARF unwind isn't available (Arnaldo Carvalho de Melo)
- Remove x86 references from arch-neutral Build, fixing it in !x86 arches,
reported as breaking the build for powerpc64le in linux-next (Arnaldo Carvalho de Melo)
Infrastructure:
- Do memset() variable 'st' using the correct size in the jit code (Colin Ian King)
- Fix postgresql ubuntu 'perf script' install instructions (Chris Phlipot)
- Use callchain_param more thoroughly when checking how callchains were
configured, eventually will be the only way to look for callchain parameters
(Arnaldo Carvalho de Melo)
- Fix some issues in the 'perf test kallsyms' entry (Arnaldo Carvalho de Melo)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
----------------------------------------------------------------
Arnaldo Carvalho de Melo (12):
perf trace: Fix build when DWARF unwind isn't available
perf evsel: Add missign class prefix to has_branch_stack method
perf script: Check sample->callchain before using it
perf callchain: Set callchain_param.enabled when parsing --call-graph
perf report: Use callchain_param.enabled instead of tool specific knob
perf tools: Ditch record_opts.callgraph_set
perf hists browser: Fold two consecutive symbol_conf.use_callchain ifs
perf top: Use callchain_param.enabled instead of symbol_conf.use_callchain
perf build: Remove x86 references from arch-neutral Build
perf symbols: Allow loading kallsyms without considering kcore files
perf test: Ignore kcore files in the "vmlinux matches kallsyms" test
perf test: Add missing verbose output explaining the reason for failure
Chris Phlipot (1):
perf script: Fix postgresql ubuntu install instructions
Colin Ian King (1):
perf jit: memset() variable 'st' using the correct size
tools/perf/builtin-record.c | 14 ++++++-------
tools/perf/builtin-report.c | 11 +++++-----
tools/perf/builtin-script.c | 2 +-
tools/perf/builtin-top.c | 25 +++++++++++------------
tools/perf/builtin-trace.c | 10 ++++-----
tools/perf/perf.h | 1 -
tools/perf/scripts/python/export-to-postgresql.py | 5 ++---
tools/perf/tests/vmlinux-kallsyms.c | 11 +++++++++-
tools/perf/ui/browsers/hists.c | 5 ++---
tools/perf/util/Build | 4 ----
tools/perf/util/callchain.c | 2 ++
tools/perf/util/evsel.h | 2 +-
tools/perf/util/jitdump.c | 4 ++--
tools/perf/util/machine.c | 14 +++++++++----
tools/perf/util/machine.h | 2 ++
tools/perf/util/session.c | 4 ++--
tools/perf/util/symbol.c | 12 ++++++++---
tools/perf/util/symbol.h | 2 ++
18 files changed, 74 insertions(+), 56 deletions(-)
[toc] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-04-19 18:00 +0200 |
| Subject | [PATCH 08/14] perf top: Use callchain_param.enabled instead of symbol_conf.use_callchain |
| Message-ID | <rpGeg-KT-49@gated-at.bofh.it> |
| In reply to | #1382648 |
From: Arnaldo Carvalho de Melo <acme@redhat.com>
One more step in the direction of using just callchain_param for
callchain parameters.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-3b1o9kb2dc94zldz0klckti6@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-top.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index f0cfdf394fac..c130a11d3a0d 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -917,15 +917,15 @@ out_err:
return -1;
}
-static int perf_top__setup_sample_type(struct perf_top *top __maybe_unused)
+static int callchain_param__setup_sample_type(struct callchain_param *callchain)
{
if (!sort__has_sym) {
- if (symbol_conf.use_callchain) {
+ if (callchain->enabled) {
ui__error("Selected -g but \"sym\" not present in --sort/-s.");
return -EINVAL;
}
- } else if (callchain_param.mode != CHAIN_NONE) {
- if (callchain_register_param(&callchain_param) < 0) {
+ } else if (callchain->mode != CHAIN_NONE) {
+ if (callchain_register_param(callchain) < 0) {
ui__error("Can't register callchain params.\n");
return -EINVAL;
}
@@ -952,7 +952,7 @@ static int __cmd_top(struct perf_top *top)
goto out_delete;
}
- ret = perf_top__setup_sample_type(top);
+ ret = callchain_param__setup_sample_type(&callchain_param);
if (ret)
goto out_delete;
@@ -1311,7 +1311,7 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
top.sym_evsel = perf_evlist__first(top.evlist);
- if (!symbol_conf.use_callchain) {
+ if (!callchain_param.enabled) {
symbol_conf.cumulate_callchain = false;
perf_hpp__cancel_cumulate();
}
--
2.5.5
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-04-19 18:00 +0200 |
| Subject | [PATCH 09/14] perf script: Fix postgresql ubuntu install instructions |
| Message-ID | <rpGeg-KT-51@gated-at.bofh.it> |
| In reply to | #1382648 |
From: Chris Phlipot <cphlipot0@gmail.com>
The current instructions for setting up an Ubuntu system for using the
export-to-postgresql.py script are incorrect.
The instructions in the script have been updated to work on newer
versions of ubuntu.
-Add missing dependencies to apt-get command:
python-pyside.qtsql, libqt4-sql-psql
-Add '-s' option to createuser command to force the user to be a
superuser since the command doesn't prompt as indicated in the
current instructions.
Tested on: Ubuntu 14.04, Ubuntu 16.04(beta)
Signed-off-by: Chris Phlipot <cphlipot0@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1461056164-14914-3-git-send-email-cphlipot0@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/scripts/python/export-to-postgresql.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tools/perf/scripts/python/export-to-postgresql.py b/tools/perf/scripts/python/export-to-postgresql.py
index 1b02cdc0cab6..6f0ca6873c17 100644
--- a/tools/perf/scripts/python/export-to-postgresql.py
+++ b/tools/perf/scripts/python/export-to-postgresql.py
@@ -34,10 +34,9 @@ import datetime
#
# ubuntu:
#
-# $ sudo apt-get install postgresql
+# $ sudo apt-get install postgresql python-pyside.qtsql libqt4-sql-psql
# $ sudo su - postgres
-# $ createuser <your user id here>
-# Shall the new role be a superuser? (y/n) y
+# $ createuser -s <your user id here>
#
# An example of using this script with Intel PT:
#
--
2.5.5
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-04-19 18:00 +0200 |
| Subject | [PATCH 10/14] perf jit: memset() variable 'st' using the correct size |
| Message-ID | <rpGeh-KT-59@gated-at.bofh.it> |
| In reply to | #1382648 |
From: Colin Ian King <colin.king@canonical.com>
The current code is memsetting the 'struct stat' variable 'st' with the size of
'stat' (which turns out to be 1 byte) rather than the size of variable 'sz'.
Committer notes:
sizeof(function) isn't valid, the result depends on the compiler used, with
gcc, enabling pedantic warnings we get:
$ cat sizeof_function.c
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
int main(void)
{
printf("sizeof(stat)=%zd, stat=%p\n", sizeof(stat), stat);
return 0;
}
$ readelf -sW sizeof_function | grep -w stat
49: 0000000000400630 16 FUNC WEAK HIDDEN 13 stat
$ cc -pedantic sizeof_function.c -o sizeof_function
sizeof_function.c: In function ‘main’:
sizeof_function.c:8:46: warning: invalid application of ‘sizeof’ to a function type [-Wpointer-arith]
printf("sizeof(stat)=%zd, stat=%p\n", sizeof(stat), stat);
^
$ ./sizeof_function
sizeof(stat)=1, stat=0x400630
$
Standard C, section 6.5.3.4:
"The sizeof operator shall not be applied to an expression that has function
type or an incomplete type, to the parenthesized name of such a type,
or to an expression that designates a bit-field member."
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Fixes: 9b07e27f88b9 ("perf inject: Add jitdump mmap injection support")
Link: http://lkml.kernel.org/r/1461020838-9260-1-git-send-email-colin.king@canonical.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/jitdump.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c
index 52fcef3074fe..86afe9618bb0 100644
--- a/tools/perf/util/jitdump.c
+++ b/tools/perf/util/jitdump.c
@@ -412,7 +412,7 @@ static int jit_repipe_code_load(struct jit_buf_desc *jd, union jr_entry *jr)
return -1;
}
if (stat(filename, &st))
- memset(&st, 0, sizeof(stat));
+ memset(&st, 0, sizeof(st));
event->mmap2.header.type = PERF_RECORD_MMAP2;
event->mmap2.header.misc = PERF_RECORD_MISC_USER;
@@ -500,7 +500,7 @@ static int jit_repipe_code_move(struct jit_buf_desc *jd, union jr_entry *jr)
size++; /* for \0 */
if (stat(filename, &st))
- memset(&st, 0, sizeof(stat));
+ memset(&st, 0, sizeof(st));
size = PERF_ALIGN(size, sizeof(u64));
--
2.5.5
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-04-19 18:00 +0200 |
| Subject | [PATCH 05/14] perf report: Use callchain_param.enabled instead of tool specific knob |
| Message-ID | <rpGeh-KT-57@gated-at.bofh.it> |
| In reply to | #1382648 |
From: Arnaldo Carvalho de Melo <acme@redhat.com>
We have callchain_param.enabled, so no need to have something just for
'perf report' to do the same thing.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-wbeisubpualwogwi5u8utnt1@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-report.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 160ea23b45aa..1d5be0bd426f 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -47,7 +47,6 @@ struct report {
struct perf_tool tool;
struct perf_session *session;
bool use_tui, use_gtk, use_stdio;
- bool dont_use_callchains;
bool show_full_info;
bool show_threads;
bool inverted_callchain;
@@ -247,7 +246,7 @@ static int report__setup_sample_type(struct report *rep)
"you call 'perf record' without -g?\n");
return -1;
}
- } else if (!rep->dont_use_callchains &&
+ } else if (!callchain_param.enabled &&
callchain_param.mode != CHAIN_NONE &&
!symbol_conf.use_callchain) {
symbol_conf.use_callchain = true;
@@ -599,13 +598,15 @@ static int __cmd_report(struct report *rep)
static int
report_parse_callchain_opt(const struct option *opt, const char *arg, int unset)
{
- struct report *rep = (struct report *)opt->value;
+ struct callchain_param *callchain = opt->value;
+ callchain->enabled = !unset;
/*
* --no-call-graph
*/
if (unset) {
- rep->dont_use_callchains = true;
+ symbol_conf.use_callchain = false;
+ callchain->mode = CHAIN_NONE;
return 0;
}
@@ -734,7 +735,7 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
"regex filter to identify parent, see: '--sort parent'"),
OPT_BOOLEAN('x', "exclude-other", &symbol_conf.exclude_other,
"Only display entries with parent-match"),
- OPT_CALLBACK_DEFAULT('g', "call-graph", &report,
+ OPT_CALLBACK_DEFAULT('g', "call-graph", &callchain_param,
"print_type,threshold[,print_limit],order,sort_key[,branch],value",
report_callchain_help, &report_parse_callchain_opt,
callchain_default_opt),
--
2.5.5
[toc] | [prev] | [next] | [standalone]
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Date | 2016-04-19 21:10 +0200 |
| Message-ID | <rpJc6-3iE-17@gated-at.bofh.it> |
| In reply to | #1382648 |
* Arnaldo Carvalho de Melo <acme@kernel.org> wrote: > Hi Ingo, > > Please consider pulling, > > - Arnaldo > > > The following changes since commit 9243ae5b28d02dc7d71a4f00c981ef6feaede3f1: > > Merge tag 'perf-core-for-mingo-20160415' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-04-16 11:09:57 +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-20160419 > > for you to fetch changes up to 6566feafb4dba4eef30a9c0b25e6f49f996178b6: > > perf test: Add missing verbose output explaining the reason for failure (2016-04-19 12:39:36 -0300) > > ---------------------------------------------------------------- > perf/core improvements and fixes: > > Build fixes: > > - Fix 'perf trace' build when DWARF unwind isn't available (Arnaldo Carvalho de Melo) > > - Remove x86 references from arch-neutral Build, fixing it in !x86 arches, > reported as breaking the build for powerpc64le in linux-next (Arnaldo Carvalho de Melo) > > Infrastructure: > > - Do memset() variable 'st' using the correct size in the jit code (Colin Ian King) > > - Fix postgresql ubuntu 'perf script' install instructions (Chris Phlipot) > > - Use callchain_param more thoroughly when checking how callchains were > configured, eventually will be the only way to look for callchain parameters > (Arnaldo Carvalho de Melo) > > - Fix some issues in the 'perf test kallsyms' entry (Arnaldo Carvalho de Melo) > > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> > > ---------------------------------------------------------------- > Arnaldo Carvalho de Melo (12): > perf trace: Fix build when DWARF unwind isn't available > perf evsel: Add missign class prefix to has_branch_stack method > perf script: Check sample->callchain before using it > perf callchain: Set callchain_param.enabled when parsing --call-graph > perf report: Use callchain_param.enabled instead of tool specific knob > perf tools: Ditch record_opts.callgraph_set > perf hists browser: Fold two consecutive symbol_conf.use_callchain ifs > perf top: Use callchain_param.enabled instead of symbol_conf.use_callchain > perf build: Remove x86 references from arch-neutral Build > perf symbols: Allow loading kallsyms without considering kcore files > perf test: Ignore kcore files in the "vmlinux matches kallsyms" test > perf test: Add missing verbose output explaining the reason for failure > > Chris Phlipot (1): > perf script: Fix postgresql ubuntu install instructions > > Colin Ian King (1): > perf jit: memset() variable 'st' using the correct size > > tools/perf/builtin-record.c | 14 ++++++------- > tools/perf/builtin-report.c | 11 +++++----- > tools/perf/builtin-script.c | 2 +- > tools/perf/builtin-top.c | 25 +++++++++++------------ > tools/perf/builtin-trace.c | 10 ++++----- > tools/perf/perf.h | 1 - > tools/perf/scripts/python/export-to-postgresql.py | 5 ++--- > tools/perf/tests/vmlinux-kallsyms.c | 11 +++++++++- > tools/perf/ui/browsers/hists.c | 5 ++--- > tools/perf/util/Build | 4 ---- > tools/perf/util/callchain.c | 2 ++ > tools/perf/util/evsel.h | 2 +- > tools/perf/util/jitdump.c | 4 ++-- > tools/perf/util/machine.c | 14 +++++++++---- > tools/perf/util/machine.h | 2 ++ > tools/perf/util/session.c | 4 ++-- > tools/perf/util/symbol.c | 12 ++++++++--- > tools/perf/util/symbol.h | 2 ++ > 18 files changed, 74 insertions(+), 56 deletions(-) Pulled, thanks a lot Arnaldo! Ingo
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web