Em Tue, Apr 14, 2015 at 06:00:17PM +0530, sahil aggarwal escreveu:
> > So, there are some critical pieces of information missing here:
> > - perf --version
> bash-4.1# perf --version
> perf version 3.2.17
This is really, really super old, but should probably not be a problem
:-)
> > - cat /proc/cpuinfo
> processor : 0
> vendor_id : GenuineIntel
> cpu family : 6
> model : 45
> model name : Intel(R) Xeon(R) CPU E5-2643 0 @ 3.30GHz
<SNIP>
> > - uname -a
> bash-4.1# uname -a
> Linux ops-es2 3.2.66-amd64 #1 SMP Wed Mar 4 16:29:30 IST 2015 x86_64 GNU/Linux
Humm, when you think that something is wrong about a piece of software you're
dealing with, please try using the latest release for that software to see if
the results are the same, because you may be hitting a bug long fixed.
Anyway, read on :-)
> > [root@zoo ~]# cat /sys/kernel/debug/events/sched/sched_switch/format
> > name: sched_switch
> > ID: 263
> bash-4.1# cat /sys/kernel/debug/tracing/events/sched/sched_switch/id
> 87
> > So you have two counters, one in each CPU, for the same thread? What is
> > the intent?
> I have multiple tracepoints(say ~20-25), i tried it to enable them for
> all CPU's but when i do attr->inherit = 1, it doesnt mmap the FD(
This is incomplete: "multiple events for all CPUS" ok, but for a specific
thread? Or for all of them?
See this, look for the inherit flag, then look for the CPU arg to
sys_perf_event_open, many tracepoints, a process that creates a process that
creates a process that makes a networking call that hits net:*skb* tracepoints,
is something like that that you want?
[root@zoo ~]# perf stat -vv -e sched:* -e skb:* time time ping -c 1 127.0.0.1
<SNIP>
------------------------------------------------------------
perf_event_attr:
type 2
size 112
config 10b
{ sample_period, sample_freq } 1
sample_type TIME|CPU|PERIOD|RAW
read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING
disabled 1
inherit 1
enable_on_exec 1
exclude_guest 1
------------------------------------------------------------
sys_perf_event_open: pid 9944 cpu -1 group_fd -1 flags 0x8
------------------------------------------------------------
perf_event_attr:
type 2
size 112
config 10a
{ sample_period, sample_freq } 1
sample_type TIME|CPU|PERIOD|RAW
read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING
disabled 1
inherit 1
enable_on_exec 1
exclude_guest 1
------------------------------------------------------------
sys_perf_event_open: pid 9944 cpu -1 group_fd -1 flags 0x8
------------------------------------------------------------
perf_event_attr:
type 2
size 112
config 109
{ sample_period, sample_freq } 1
sample_type TIME|CPU|PERIOD|RAW
read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING
disabled 1
inherit 1
enable_on_exec 1
exclude_guest 1
------------------------------------------------------------
sys_perf_event_open: pid 9944 cpu -1 group_fd -1 flags 0x8
------------------------------------------------------------
perf_event_attr:
type 2
size 112
config 108
{ sample_period, sample_freq } 1
sample_type TIME|CPU|PERIOD|RAW
read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING
disabled 1
inherit 1
enable_on_exec 1
exclude_guest 1
------------------------------------------------------------
sys_perf_event_open: pid 9944 cpu -1 group_fd -1 flags 0x8
------------------------------------------------------------
<suppress many other tracepoint perf_event_attr dumps>
------------------------------------------------------------
sys_perf_event_open: pid 9944 cpu -1 group_fd -1 flags 0x8
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.061 ms
--- 127.0.0.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.061/0.061/0.061/0.000 ms
0.00user 0.00system 0:00.00elapsed 0%CPU (0avgtext+0avgdata 2244maxresident)k
0inputs+0outputs (0major+102minor)pagefaults 0swaps
0.00user 0.00system 0:00.00elapsed 50%CPU (0avgtext+0avgdata 2244maxresident)k
0inputs+0outputs (0major+182minor)pagefaults 0swaps
sched:sched_kthread_stop: 0 2488023 2488023
sched:sched_kthread_stop_ret: 0 2488023 2488023
sched:sched_wakeup: 130 2488023 2488023
sched:sched_wakeup_new: 4 2488023 2488023
sched:sched_switch: 122 2488023 2488023
sched:sched_migrate_task: 6 2488023 2488023
sched:sched_process_free: 0 2488023 2488023
sched:sched_process_exit: 3 2488023 2488023
sched:sched_wait_task: 0 2488023 2488023
sched:sched_process_wait: 2 2488023 2488023
sched:sched_process_fork: 2 2488023 2488023
sched:sched_process_exec: 3 2488023 2488023
sched:sched_stat_wait: 0 2488023 2488023
sched:sched_stat_sleep: 0 2488023 2488023
sched:sched_stat_iowait: 0 2488023 2488023
sched:sched_stat_blocked: 0 2488023 2488023
sched:sched_stat_runtime: 2354533 2488023 2488023
sched:sched_pi_setprio: 0 2488023 2488023
sched:sched_move_numa: 0 2488023 2488023
sched:sched_stick_numa: 0 2488023 2488023
sched:sched_swap_numa: 0 2488023 2488023
sched:sched_wake_idle_without_ipi: 7 2488023 2488023
skb:kfree_skb: 1 2488023 2488023
skb:consume_skb: 2 2488023 2488023
skb:skb_copy_datagram_iovec: 1 2488023 2488023
Performance counter stats for 'time time ping -c 1 127.0.0.1':
0 sched:sched_kthread_stop
0 sched:sched_kthread_stop_ret
130 sched:sched_wakeup
4 sched:sched_wakeup_new
122 sched:sched_switch
6 sched:sched_migrate_task
0 sched:sched_process_free
3 sched:sched_process_exit
0 sched:sched_wait_task
2 sched:sched_process_wait
2 sched:sched_process_fork
3 sched:sched_process_exec
0 sched:sched_stat_wait
0 sched:sched_stat_sleep
0 sched:sched_stat_iowait
0 sched:sched_stat_blocked
2,354,533 sched:sched_stat_runtime
0 sched:sched_pi_setprio
0 sched:sched_move_numa
0 sched:sched_stick_numa
0 sched:sched_swap_numa
7 sched:sched_wake_idle_without_ipi
1 skb:kfree_skb
2 skb:consume_skb
1 skb:skb_copy_datagram_iovec
0.003088642 seconds time elapsed
[root@zoo ~]#
> Gives EINVAL). When i digged the perf code a bit, i found :
>
> if (evlist->cpus->map[0] < 0)
> no_inherit = true;
>
> So, i thought may be it doesn't allow trace on all CPU's when i
> inherit. Does that make sense.?
--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html