* [PATCH 1/4] perf probe: Fix coredump introduced by probe module option
2011-08-08 15:52 [GIT PULL 0/4] perf/core fixes Arnaldo Carvalho de Melo
@ 2011-08-08 15:52 ` Arnaldo Carvalho de Melo
2011-08-08 15:52 ` [PATCH 2/4] perf lock: Dropping unsupported ':r' modifier Arnaldo Carvalho de Melo
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-08-08 15:52 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Jovi Zhang, Ingo Molnar, Paul Mackerras,
Peter Zijlstra, Arnaldo Carvalho de Melo
From: Jovi Zhang <bookjovi@gmail.com>
perf will coredump if the user doesn't give the "-m" option in probe
command, this patch fixes it.
[root@localhost perf]# ./perf probe --add='PROBE'
Segmentation fault (core dumped)
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1311602888-2389-1-git-send-email-bookjovi@gmail.com
Signed-off-by: Jovi Zhang <bookjovi@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/probe-event.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index b82d54f..1c7bfa5 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -1820,11 +1820,15 @@ static int convert_to_probe_trace_events(struct perf_probe_event *pev,
ret = -ENOMEM;
goto error;
}
- tev->point.module = strdup(module);
- if (tev->point.module == NULL) {
- ret = -ENOMEM;
- goto error;
+
+ if (module) {
+ tev->point.module = strdup(module);
+ if (tev->point.module == NULL) {
+ ret = -ENOMEM;
+ goto error;
+ }
}
+
tev->point.offset = pev->point.offset;
tev->point.retprobe = pev->point.retprobe;
tev->nargs = pev->nargs;
--
1.6.2.5
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 2/4] perf lock: Dropping unsupported ':r' modifier
2011-08-08 15:52 [GIT PULL 0/4] perf/core fixes Arnaldo Carvalho de Melo
2011-08-08 15:52 ` [PATCH 1/4] perf probe: Fix coredump introduced by probe module option Arnaldo Carvalho de Melo
@ 2011-08-08 15:52 ` Arnaldo Carvalho de Melo
2011-08-08 15:52 ` [PATCH 3/4] perf tools: Make clean leaves some files Arnaldo Carvalho de Melo
2011-08-08 15:52 ` [PATCH 4/4] perf tools: do not look at ./config for configuration Arnaldo Carvalho de Melo
3 siblings, 0 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-08-08 15:52 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Zhu Yanhai, Ingo Molnar, Paul Mackerras,
Zhu Yanhai, Peter Zijlstra, Arnaldo Carvalho de Melo
From: Zhu Yanhai <zhu.yanhai@gmail.com>
Looks to me like the :r modifier is not supported anymore, so remove it
from the list of events. Without this fix 'perf lock record' doesn't
work.
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Zhu Yanhai <gaoyang.zyh@taobao.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1312035232-9534-1-git-send-email-gaoyang.zyh@taobao.com
Signed-off-by: Zhu Yanhai <gaoyang.zyh@taobao.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-lock.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c
index 9ac05aa..899080a 100644
--- a/tools/perf/builtin-lock.c
+++ b/tools/perf/builtin-lock.c
@@ -942,10 +942,10 @@ static const char *record_args[] = {
"-f",
"-m", "1024",
"-c", "1",
- "-e", "lock:lock_acquire:r",
- "-e", "lock:lock_acquired:r",
- "-e", "lock:lock_contended:r",
- "-e", "lock:lock_release:r",
+ "-e", "lock:lock_acquire",
+ "-e", "lock:lock_acquired",
+ "-e", "lock:lock_contended",
+ "-e", "lock:lock_release",
};
static int __cmd_record(int argc, const char **argv)
--
1.6.2.5
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 3/4] perf tools: Make clean leaves some files
2011-08-08 15:52 [GIT PULL 0/4] perf/core fixes Arnaldo Carvalho de Melo
2011-08-08 15:52 ` [PATCH 1/4] perf probe: Fix coredump introduced by probe module option Arnaldo Carvalho de Melo
2011-08-08 15:52 ` [PATCH 2/4] perf lock: Dropping unsupported ':r' modifier Arnaldo Carvalho de Melo
@ 2011-08-08 15:52 ` Arnaldo Carvalho de Melo
2011-08-08 15:52 ` [PATCH 4/4] perf tools: do not look at ./config for configuration Arnaldo Carvalho de Melo
3 siblings, 0 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-08-08 15:52 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Kusanagi Kouichi, Ingo Molnar, Paul Mackerras,
Peter Zijlstra, Arnaldo Carvalho de Melo
From: Kusanagi Kouichi <slash@ac.auone-net.jp>
Use LIB_OBJS and BUILTIN_OBJS for .o files.
LIB_FILE is already prefixed with OUTPUT.
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20110807083932.9C0E514C03B@msa103.auone-net.jp
Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index d0861bb..5bf48fc 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -892,7 +892,7 @@ quick-install-html:
### Cleaning rules
clean:
- $(RM) $(OUTPUT){*.o,*/*.o,*/*/*.o,*/*/*/*.o,$(LIB_FILE),perf-archive}
+ $(RM) $(LIB_OBJS) $(BUILTIN_OBJS) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf.o $(LANG_BINDINGS)
$(RM) $(ALL_PROGRAMS) perf
$(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope*
$(MAKE) -C Documentation/ clean
--
1.6.2.5
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 4/4] perf tools: do not look at ./config for configuration
2011-08-08 15:52 [GIT PULL 0/4] perf/core fixes Arnaldo Carvalho de Melo
` (2 preceding siblings ...)
2011-08-08 15:52 ` [PATCH 3/4] perf tools: Make clean leaves some files Arnaldo Carvalho de Melo
@ 2011-08-08 15:52 ` Arnaldo Carvalho de Melo
3 siblings, 0 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-08-08 15:52 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Jonathan Nieder, 632923, Ben Hutchings,
Christian Ohm, Ingo Molnar, Paul Mackerras, Peter Zijlstra,
Arnaldo Carvalho de Melo
From: Jonathan Nieder <jrnieder@gmail.com>
In addition to /etc/perfconfig and $HOME/.perfconfig, perf looks for
configuration in the file ./config, imitating git which looks at
$GIT_DIR/config. If ./config is not a perf configuration file, it
fails, or worse, treats it as a configuration file and changes behavior
in some unexpected way.
"config" is not an unusual name for a file to be lying around and perf
does not have a private directory dedicated for its own use, so let's
just stop looking for configuration in the cwd. Callers needing
context-sensitive configuration can use the PERF_CONFIG environment
variable.
Requested-by: Christian Ohm <chr.ohm@gmx.net>
Cc: 632923@bugs.debian.org
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Christian Ohm <chr.ohm@gmx.net>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20110805165838.GA7237@elie.gateway.2wire.net
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/config.c | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c
index e02d78c..6c86eca 100644
--- a/tools/perf/util/config.c
+++ b/tools/perf/util/config.c
@@ -399,7 +399,6 @@ static int perf_config_global(void)
int perf_config(config_fn_t fn, void *data)
{
int ret = 0, found = 0;
- char *repo_config = NULL;
const char *home = NULL;
/* Setting $PERF_CONFIG makes perf read _only_ the given config file. */
@@ -421,12 +420,6 @@ int perf_config(config_fn_t fn, void *data)
free(user_config);
}
- repo_config = perf_pathdup("config");
- if (!access(repo_config, R_OK)) {
- ret += perf_config_from_file(fn, repo_config, data);
- found += 1;
- }
- free(repo_config);
if (found == 0)
return -1;
return ret;
--
1.6.2.5
^ permalink raw reply [flat|nested] 5+ messages in thread