Skip to contentSkip to conversation

perf record: mmap fails when specifying process/thread

DISCUSSION David Ahern 2 participants 3 messages Feb 16, 2011 – Feb 17, 2011

lore
Share & tools
lore
#0 lore raw

Latest perf-core (pulled 5 minutes ago):

# ps -C sshd
  PID TTY          TIME CMD
  961 ?        00:00:00 sshd
 1042 ?        00:00:00 sshd
# /tmp/build-perf/perf record -v -fo/tmp/perf.data -p 1042
  Warning:  ... trying to fall back to cpu-clock-ticks

Fatal: failed to mmap with 22 (Invalid argument)

It works fine with -a argument and when a command is given, but fails with the -p or -t argument.

David

#1 lore raw

Em Wed, Feb 16, 2011 at 08:43:45AM -0700, David Ahern escreveu:

Quoted 7 lines

Latest perf-core (pulled 5 minutes ago):

# ps -C sshd
  PID TTY          TIME CMD
  961 ?        00:00:00 sshd
 1042 ?        00:00:00 sshd
Quoted 8 lines
# /tmp/build-perf/perf record -v -fo/tmp/perf.data -p 1042
  Warning:  ... trying to fall back to cpu-clock-ticks

Fatal: failed to mmap with 22 (Invalid argument)

It works fine with -a argument and when a command is given, but fails with the -p or -t argument.

In my radar, perf/urgent works tho, kinda made me lazy due to compound with unrelated company work :-\ Need to fix that ASAP.

- Arnaldo

#2 lore raw
Quoted 14 lines · Arnaldo Carvalho de Melo

Em Wed, Feb 16, 2011 at 08:43:45AM -0700, David Ahern escreveu:

Quoted 13 lines

Latest perf-core (pulled 5 minutes ago):

# ps -C sshd
  PID TTY          TIME CMD
  961 ?        00:00:00 sshd
 1042 ?        00:00:00 sshd
# /tmp/build-perf/perf record -v -fo/tmp/perf.data -p 1042
  Warning:  ... trying to fall back to cpu-clock-ticks

Fatal: failed to mmap with 22 (Invalid argument)

Quoted 7 lines
Quoted 2 lines

It works fine with -a argument and when a command is given, but fails with the -p or -t argument.

In my radar, perf/urgent works tho, kinda made me lazy due to compound with unrelated company work :-\ Need to fix that ASAP.

- Arnaldo

Works in latest kernel git too. I looked at a diff of the tools between the kernel tree and perf-core -- too many changes for me to wade through right now.

BTW, it fails running the Fedora 14 kernel too, so my guess is a userspace change.

David