• Arnaldo Carvalho de Melo's avatar
    perf trace: Resolve prctl's 'option' arg strings to numbers · d7a07b29
    Arnaldo Carvalho de Melo authored
      # perf trace -e syscalls:sys_enter_prctl --filter="option==SET_NAME"
         0.000 Socket Thread/3860 syscalls:sys_enter_prctl(option: SET_NAME, arg2: 0x7fc50b9733e8)
         0.053 SSL Cert #78/3860 syscalls:sys_enter_prctl(option: SET_NAME, arg2: 0x7fc50b9733e8)
    ^C  #
    
    If one uses '-v' with 'perf trace', we can see the filter it puts in
    place:
    
      New filter for syscalls:sys_enter_prctl: (option==0xf) && (common_pid != 3859 && common_pid != 2757)
    
    We still need to allow using plain '-e prctl' and have this turn into
    creating a 'syscalls:sys_enter_prctl' event so that the filter can be
    applied only to it as right now '-e prctl' ends up using the
    'raw_syscalls:sys_enter/sys_exit'.
    
    The end goal is to have something like:
    
      # perf trace -e prctl/option==SET_NAME/
    
    And have that use tracepoint filters or eBPF ones.
    
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Christian Brauner <christian.brauner@ubuntu.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Mike Christie <mchristi@redhat.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    d7a07b29
builtin-trace.c 145 KB