1. 02 4月, 2017 1 次提交
  2. 23 3月, 2017 1 次提交
  3. 10 3月, 2017 1 次提交
  4. 28 2月, 2017 1 次提交
  5. 25 2月, 2017 1 次提交
  6. 17 2月, 2017 1 次提交
  7. 16 2月, 2017 1 次提交
  8. 15 2月, 2017 1 次提交
  9. 14 2月, 2017 3 次提交
  10. 13 2月, 2017 1 次提交
    • A
      bpf: introduce BPF_F_ALLOW_OVERRIDE flag · 7f677633
      Alexei Starovoitov 提交于
      If BPF_F_ALLOW_OVERRIDE flag is used in BPF_PROG_ATTACH command
      to the given cgroup the descendent cgroup will be able to override
      effective bpf program that was inherited from this cgroup.
      By default it's not passed, therefore override is disallowed.
      
      Examples:
      1.
      prog X attached to /A with default
      prog Y fails to attach to /A/B and /A/B/C
      Everything under /A runs prog X
      
      2.
      prog X attached to /A with allow_override.
      prog Y fails to attach to /A/B with default (non-override)
      prog M attached to /A/B with allow_override.
      Everything under /A/B runs prog M only.
      
      3.
      prog X attached to /A with allow_override.
      prog Y fails to attach to /A with default.
      The user has to detach first to switch the mode.
      
      In the future this behavior may be extended with a chain of
      non-overridable programs.
      
      Also fix the bug where detach from cgroup where nothing is attached
      was not throwing error. Return ENOENT in such case.
      
      Add several testcases and adjust libbpf.
      
      Fixes: 30070984 ("cgroup: add support for eBPF programs")
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      Acked-by: NDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: NTejun Heo <tj@kernel.org>
      Acked-by: NDaniel Mack <daniel@zonque.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7f677633
  11. 11 2月, 2017 6 次提交
  12. 09 2月, 2017 1 次提交
  13. 08 2月, 2017 2 次提交
    • D
      tools lib traceevent: Robustify do_generate_dynamic_list_file · 6467753d
      David Carrillo-Cisneros 提交于
      The dynamic-list-file used to export dynamic symbols introduced in
      
      commit e3d09ec8 ("tools lib traceevent: Export dynamic symbols
      used by traceevent plugins")
      
      is generated without any sort of error checking.
      
      I experienced problems due to an old version of nm (v 0.158) that outputs
      in a format distinct from the assumed by the script.
      
      Robustify the built of dynamic symbol list  by enforcing that the second
      column of $(NM) -u <files> is either "U" (Undefined), "W" or "w" (undefined
      weak), which are the possible outputs from non-ancient $(NM) versions.
      Print an error if format is unexpected.
      
      v2: Accept "W" and "w" symbol options.
      Signed-off-by: NDavid Carrillo-Cisneros <davidcc@google.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: He Kuang <hekuang@huawei.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Michal Marek <mmarek@suse.com>
      Cc: Paul Turner <pjt@google.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/r/20170208052840.112182-1-davidcc@google.com
      [ Use STRING1 = STRING1 instead of == to make this work on Ubuntu systems ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      6467753d
    • R
      perf sdt: Show proper hint when event not yet in place via 'perf probe' · 27cf5706
      Ravi Bangoria 提交于
      All events from 'perf list', except SDT events, can be directly recorded
      with 'perf record'. But, the flow is little different for SDT events.
      
      Probe points for SDT event needs to be created using 'perf probe' before
      recording it using 'perf record'.
      
      Perf shows misleading hint when a user tries to record SDT event without
      first creating a probe point. Show proper hint there.
      
      Before patch:
      
        $ perf record -a -e sdt_glib:idle__add
          event syntax error: 'sdt_glib:idle__add'
                               \___ unknown tracepoint
      
          Error: File /sys/kernel/debug/tracing/events/sdt_glib/idle__add not found.
          Hint:  Perhaps this kernel misses some CONFIG_ setting to enable this feature?.
          ...
      
      After patch:
      
        $ perf record -a -e sdt_glib:idle__add
          event syntax error: 'sdt_glib:idle__add'
                               \___ unknown tracepoint
      
          Error: File /sys/kernel/debug/tracing/events/sdt_glib/idle__add not found.
          Hint:  SDT event cannot be directly recorded on.
                 Please first use 'perf probe sdt_glib:idle__add' before recording it.
          ...
      
        $ perf probe sdt_glib:idle__add
          Added new event:
            sdt_glib:idle__add   (on %idle__add in /usr/lib64/libglib-2.0.so.0.5000.2)
      
          You can now use it in all perf tools, such as:
      
              perf record -e sdt_glib:idle__add -aR sleep 1
      
        $ perf record -a -e sdt_glib:idle__add
          [ perf record: Woken up 1 times to write data ]
          [ perf record: Captured and wrote 0.175 MB perf.data ]
      Suggested-and-Acked-by: NIngo Molnar <mingo@redhat.com>
      Signed-off-by: NRavi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alexis Berlemont <alexis.berlemont@gmail.com>
      Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20170203102642.17258-1-ravi.bangoria@linux.vnet.ibm.com
      [ s/Please use/Please first use/ and break the Hint line in two ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      27cf5706
  14. 01 2月, 2017 4 次提交
  15. 26 1月, 2017 5 次提交
  16. 17 1月, 2017 1 次提交
  17. 12 1月, 2017 1 次提交
  18. 04 1月, 2017 1 次提交
    • D
      tools lib traceevent: Fix prev/next_prio for deadline tasks · 07485918
      Daniel Bristot de Oliveira 提交于
      Currently, the sched:sched_switch tracepoint reports deadline tasks with
      priority -1. But when reading the trace via perf script I've got the
      following output:
      
        # ./d & # (d is a deadline task, see [1])
        # perf record -e sched:sched_switch -a sleep 1
        # perf script
            ...
               swapper     0 [000]  2146.962441: sched:sched_switch: swapper/0:0 [120] R ==> d:2593 [4294967295]
                     d  2593 [000]  2146.972472: sched:sched_switch: d:2593 [4294967295] R ==> g:2590 [4294967295]
      
      The task d reports the wrong priority [4294967295]. This happens because
      the "int prio" is stored in an unsigned long long val. Although it is
      set as a %lld, as int is shorter than unsigned long long,
      trace_seq_printf prints it as a positive number.
      
      The fix is just to cast the val as an int, and print it as a %d,
      as in the sched:sched_switch tracepoint's "format".
      
      The output with the fix is:
      
        # ./d &
        # perf record -e sched:sched_switch -a sleep 1
        # perf script
            ...
               swapper     0 [000]  4306.374037: sched:sched_switch: swapper/0:0 [120] R ==> d:10941 [-1]
                     d 10941 [000]  4306.383823: sched:sched_switch: d:10941 [-1] R ==> swapper/0:0 [120]
      
      [1] d.c
      
       ---
        #include <stdio.h>
        #include <unistd.h>
        #include <sys/syscall.h>
        #include <linux/types.h>
        #include <linux/sched.h>
      
        struct sched_attr {
      	__u32 size, sched_policy;
      	__u64 sched_flags;
      	__s32 sched_nice;
      	__u32 sched_priority;
      	__u64 sched_runtime, sched_deadline, sched_period;
        };
      
        int sched_setattr(pid_t pid, const struct sched_attr *attr, unsigned int flags)
        {
      	return syscall(__NR_sched_setattr, pid, attr, flags);
        }
      
        int main(void)
        {
      	struct sched_attr attr = {
      		.size		= sizeof(attr),
      		.sched_policy	= SCHED_DEADLINE, /* This creates a 10ms/30ms reservation */
      		.sched_runtime	= 10 * 1000 * 1000,
      		.sched_period	= attr.sched_deadline = 30 * 1000 * 1000,
      	};
      
      	if (sched_setattr(0, &attr, 0) < 0) {
      		perror("sched_setattr");
      		return -1;
      	}
      
      	for(;;);
        }
       ---
      
      Committer notes:
      
      Got the program from the provided URL, http://bristot.me/lkml/d.c,
      trimmed it and included in the cset log above, so that we have
      everything needed to test it in one place.
      Signed-off-by: NDaniel Bristot de Oliveira <bristot@redhat.com>
      Acked-by: NSteven Rostedt <rostedt@goodmis.org>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Daniel Bristot de Oliveira <bristot@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/866ef75bcebf670ae91c6a96daa63597ba981f0d.1483443552.git.bristot@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      07485918
  19. 03 1月, 2017 1 次提交
  20. 20 12月, 2016 1 次提交
  21. 16 12月, 2016 2 次提交
  22. 11 12月, 2016 1 次提交
  23. 29 11月, 2016 2 次提交