Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191269
b: refs/heads/master
c: e5a5f1f
h: refs/heads/master
i:
  191267: 1d17ced
v: v3
  • Loading branch information
Frederic Weisbecker committed Apr 30, 2010
1 parent 6bcb391 commit b858ae4
Show file tree
Hide file tree
Showing 41 changed files with 165 additions and 429 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 090f7204dfdb5d7f18208ea81dfdba845897cedd
refs/heads/master: e5a5f1f015cf435eb3d2f5712ba51ffdbb92cbef
6 changes: 2 additions & 4 deletions trunk/tools/perf/Documentation/perf-trace-perl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,10 @@ available as calls back into the perf executable (see below).
As an example, the following perf record command can be used to record
all sched_wakeup events in the system:

# perf record -c 1 -f -a -M -R -e sched:sched_wakeup
# perf record -a -e sched:sched_wakeup

Traces meant to be processed using a script should be recorded with
the above options: -c 1 says to sample every event, -a to enable
system-wide collection, -M to multiplex the output, and -R to collect
raw samples.
the above option: -a to enable system-wide collection.

The format file for the sched_wakep event defines the following fields
(see /sys/kernel/debug/tracing/events/sched/sched_wakeup/format):
Expand Down
10 changes: 4 additions & 6 deletions trunk/tools/perf/Documentation/perf-trace-python.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ don't care how it exited, so we'll use 'perf record' to record only
the sys_enter events:

----
# perf record -c 1 -f -a -M -R -e raw_syscalls:sys_enter
# perf record -a -e raw_syscalls:sys_enter

^C[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 56.545 MB perf.data (~2470503 samples) ]
Expand Down Expand Up @@ -359,7 +359,7 @@ your script:
# cat kernel-source/tools/perf/scripts/python/bin/syscall-counts-record

#!/bin/bash
perf record -c 1 -f -a -M -R -e raw_syscalls:sys_enter
perf record -a -e raw_syscalls:sys_enter
----

The 'report' script is also a shell script with the same base name as
Expand Down Expand Up @@ -449,12 +449,10 @@ available as calls back into the perf executable (see below).
As an example, the following perf record command can be used to record
all sched_wakeup events in the system:

# perf record -c 1 -f -a -M -R -e sched:sched_wakeup
# perf record -a -e sched:sched_wakeup

Traces meant to be processed using a script should be recorded with
the above options: -c 1 says to sample every event, -a to enable
system-wide collection, -M to multiplex the output, and -R to collect
raw samples.
the above option: -a to enable system-wide collection.

The format file for the sched_wakep event defines the following fields
(see /sys/kernel/debug/tracing/events/sched/sched_wakeup/format):
Expand Down
17 changes: 15 additions & 2 deletions trunk/tools/perf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,9 @@ LIB_H += util/include/linux/rbtree.h
LIB_H += util/include/linux/string.h
LIB_H += util/include/linux/types.h
LIB_H += util/include/asm/asm-offsets.h
LIB_H += util/include/asm/bitops.h
LIB_H += util/include/asm/bug.h
LIB_H += util/include/asm/byteorder.h
LIB_H += util/include/asm/hweight.h
LIB_H += util/include/asm/swab.h
LIB_H += util/include/asm/system.h
LIB_H += util/include/asm/uaccess.h
Expand Down Expand Up @@ -435,6 +435,7 @@ LIB_OBJS += $(OUTPUT)util/path.o
LIB_OBJS += $(OUTPUT)util/rbtree.o
LIB_OBJS += $(OUTPUT)util/bitmap.o
LIB_OBJS += $(OUTPUT)util/hweight.o
LIB_OBJS += $(OUTPUT)util/find_next_bit.o
LIB_OBJS += $(OUTPUT)util/run-command.o
LIB_OBJS += $(OUTPUT)util/quote.o
LIB_OBJS += $(OUTPUT)util/strbuf.o
Expand Down Expand Up @@ -490,7 +491,6 @@ BUILTIN_OBJS += $(OUTPUT)builtin-kmem.o
BUILTIN_OBJS += $(OUTPUT)builtin-lock.o
BUILTIN_OBJS += $(OUTPUT)builtin-kvm.o
BUILTIN_OBJS += $(OUTPUT)builtin-test.o
BUILTIN_OBJS += $(OUTPUT)builtin-inject.o

PERFLIBS = $(LIB_FILE)

Expand Down Expand Up @@ -948,6 +948,19 @@ $(OUTPUT)util/config.o: util/config.c $(OUTPUT)PERF-CFLAGS
$(OUTPUT)util/rbtree.o: ../../lib/rbtree.c $(OUTPUT)PERF-CFLAGS
$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $<

# some perf warning policies can't fit to lib/bitmap.c, eg: it warns about variable shadowing
# from <string.h> that comes from kernel headers wrapping.
KBITMAP_FLAGS=`echo $(ALL_CFLAGS) | sed s/-Wshadow// | sed s/-Wswitch-default// | sed s/-Wextra//`

$(OUTPUT)util/bitmap.o: ../../lib/bitmap.c $(OUTPUT)PERF-CFLAGS
$(QUIET_CC)$(CC) -o $@ -c $(KBITMAP_FLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $<

$(OUTPUT)util/hweight.o: ../../lib/hweight.c $(OUTPUT)PERF-CFLAGS
$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $<

$(OUTPUT)util/find_next_bit.o: ../../lib/find_next_bit.c $(OUTPUT)PERF-CFLAGS
$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $<

$(OUTPUT)util/scripting-engines/trace-event-perl.o: util/scripting-engines/trace-event-perl.c $(OUTPUT)PERF-CFLAGS
$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-shadow $<

Expand Down
2 changes: 1 addition & 1 deletion trunk/tools/perf/builtin-annotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ static int __cmd_annotate(void)
int ret;
struct perf_session *session;

session = perf_session__new(input_name, O_RDONLY, force, false);
session = perf_session__new(input_name, O_RDONLY, force);
if (session == NULL)
return -ENOMEM;

Expand Down
2 changes: 1 addition & 1 deletion trunk/tools/perf/builtin-buildid-list.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ static int __cmd_buildid_list(void)
int err = -1;
struct perf_session *session;

session = perf_session__new(input_name, O_RDONLY, force, false);
session = perf_session__new(input_name, O_RDONLY, force);
if (session == NULL)
return -1;

Expand Down
4 changes: 2 additions & 2 deletions trunk/tools/perf/builtin-diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ static int __cmd_diff(void)
int ret, i;
struct perf_session *session[2];

session[0] = perf_session__new(input_old, O_RDONLY, force, false);
session[1] = perf_session__new(input_new, O_RDONLY, force, false);
session[0] = perf_session__new(input_old, O_RDONLY, force);
session[1] = perf_session__new(input_new, O_RDONLY, force);
if (session[0] == NULL || session[1] == NULL)
return -ENOMEM;

Expand Down
228 changes: 0 additions & 228 deletions trunk/tools/perf/builtin-inject.c

This file was deleted.

2 changes: 1 addition & 1 deletion trunk/tools/perf/builtin-kmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ static void sort_result(void)
static int __cmd_kmem(void)
{
int err = -EINVAL;
struct perf_session *session = perf_session__new(input_name, O_RDONLY, 0, false);
struct perf_session *session = perf_session__new(input_name, O_RDONLY, 0);
if (session == NULL)
return -ENOMEM;

Expand Down
2 changes: 1 addition & 1 deletion trunk/tools/perf/builtin-lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ static struct perf_event_ops eops = {

static int read_events(void)
{
session = perf_session__new(input_name, O_RDONLY, 0, false);
session = perf_session__new(input_name, O_RDONLY, 0);
if (!session)
die("Initializing perf session failed\n");

Expand Down
Loading

0 comments on commit b858ae4

Please sign in to comment.