https://github.com/torvalds/linux
Revision 1bf7d836e57ba4943e33e163e730cd77ab837572 authored by Martin Liška on 12 August 2022, 11:40:49 UTC, committed by Arnaldo Carvalho de Melo on 12 August 2022, 13:27:21 UTC
When one uses -p $not_existing_pid, the output of --help is printed:

  $ perf record -p 123456789 2>&1 | head -n3

   Usage: perf record [<options>] [<command>]
      or: perf record [<options>] -- <command> [<options>]

Let's change it something similar what perf top -p $not_existing_pid
prints:

  $ ./perf top -p 123456789 --stdio
  Error:
  Couldn't create thread/CPU maps: No such process

Newly suggested error message:

  $ ./perf record -p 123456789
  Couldn't create thread/CPU maps: No such process

Signed-off-by: Martin Liška <mliska@suse.cz>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Link: http://lore.kernel.org/lkml/8e00eda1-4de0-2c44-ce67-d4df48ac1f7c@suse.cz
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent a072a7a
History
Tip revision: 1bf7d836e57ba4943e33e163e730cd77ab837572 authored by Martin Liška on 12 August 2022, 11:40:49 UTC
perf record: Improve error message of -p not_existing_pid
Tip revision: 1bf7d83
File Mode Size
asymmetric-parser.h -rw-r--r-- 981 bytes
asymmetric-subtype.h -rw-r--r-- 1.7 KB
asymmetric-type.h -rw-r--r-- 3.0 KB
big_key-type.h -rw-r--r-- 816 bytes
ceph-type.h -rw-r--r-- 162 bytes
dns_resolver-type.h -rw-r--r-- 482 bytes
encrypted-type.h -rw-r--r-- 1.1 KB
keyring-type.h -rw-r--r-- 337 bytes
request_key_auth-type.h -rw-r--r-- 747 bytes
rxrpc-type.h -rw-r--r-- 2.3 KB
system_keyring.h -rw-r--r-- 3.1 KB
trusted-type.h -rw-r--r-- 2.2 KB
trusted_caam.h -rw-r--r-- 243 bytes
trusted_tee.h -rw-r--r-- 286 bytes
trusted_tpm.h -rw-r--r-- 2.7 KB
user-type.h -rw-r--r-- 1.9 KB

back to top