Re: [RFC/PATCH 17/38] perf tools: Maintain map groups list in a leader thread

2015-10-12 Thread Jiri Olsa
On Fri, Oct 09, 2015 at 03:58:49PM +0900, Namhyung Kim wrote: SNIP > > > > > > some comment on how we treat map groups in general (for fork/clone/exit) > > would be awesome ;-) > > I admit that this code is subtle and confusing.. How about this? > > > Managing map groups is subtle in that

Re: [RFC/PATCH 17/38] perf tools: Maintain map groups list in a leader thread

2015-10-12 Thread Jiri Olsa
On Fri, Oct 09, 2015 at 03:58:49PM +0900, Namhyung Kim wrote: SNIP > > > > > > some comment on how we treat map groups in general (for fork/clone/exit) > > would be awesome ;-) > > I admit that this code is subtle and confusing.. How about this? > > > Managing map groups is subtle in that

Re: [RFC/PATCH 17/38] perf tools: Maintain map groups list in a leader thread

2015-10-09 Thread Namhyung Kim
On Thu, Oct 08, 2015 at 02:58:00PM +0200, Jiri Olsa wrote: > On Fri, Oct 02, 2015 at 02:18:58PM +0900, Namhyung Kim wrote: > > SNIP > > > int __thread__set_comm(struct thread *thread, const char *str, u64 > > timestamp, > >bool exec) > > { > > @@ -182,6 +257,40 @@ int

Re: [RFC/PATCH 17/38] perf tools: Maintain map groups list in a leader thread

2015-10-09 Thread Namhyung Kim
On Thu, Oct 08, 2015 at 02:51:43PM +0200, Jiri Olsa wrote: > On Fri, Oct 02, 2015 at 02:18:58PM +0900, Namhyung Kim wrote: > > SNIP > > > +static int thread__clone_map_groups(struct thread *thread, > > + struct thread *parent); > > + > > int

Re: [RFC/PATCH 17/38] perf tools: Maintain map groups list in a leader thread

2015-10-09 Thread Namhyung Kim
On Thu, Oct 08, 2015 at 02:51:43PM +0200, Jiri Olsa wrote: > On Fri, Oct 02, 2015 at 02:18:58PM +0900, Namhyung Kim wrote: > > SNIP > > > +static int thread__clone_map_groups(struct thread *thread, > > + struct thread *parent); > > + > > int

Re: [RFC/PATCH 17/38] perf tools: Maintain map groups list in a leader thread

2015-10-09 Thread Namhyung Kim
On Thu, Oct 08, 2015 at 02:58:00PM +0200, Jiri Olsa wrote: > On Fri, Oct 02, 2015 at 02:18:58PM +0900, Namhyung Kim wrote: > > SNIP > > > int __thread__set_comm(struct thread *thread, const char *str, u64 > > timestamp, > >bool exec) > > { > > @@ -182,6 +257,40 @@ int

Re: [RFC/PATCH 17/38] perf tools: Maintain map groups list in a leader thread

2015-10-08 Thread Jiri Olsa
On Fri, Oct 02, 2015 at 02:18:58PM +0900, Namhyung Kim wrote: SNIP > int __thread__set_comm(struct thread *thread, const char *str, u64 timestamp, > bool exec) > { > @@ -182,6 +257,40 @@ int __thread__set_comm(struct thread *thread, const char > *str, u64 timestamp, >

Re: [RFC/PATCH 17/38] perf tools: Maintain map groups list in a leader thread

2015-10-08 Thread Jiri Olsa
On Fri, Oct 02, 2015 at 02:18:58PM +0900, Namhyung Kim wrote: SNIP > +static int thread__clone_map_groups(struct thread *thread, > + struct thread *parent); > + > int __thread__set_comm(struct thread *thread, const char *str, u64 timestamp, >

Re: [RFC/PATCH 17/38] perf tools: Maintain map groups list in a leader thread

2015-10-08 Thread Jiri Olsa
On Fri, Oct 02, 2015 at 02:18:58PM +0900, Namhyung Kim wrote: SNIP > +static int thread__clone_map_groups(struct thread *thread, > + struct thread *parent); > + > int __thread__set_comm(struct thread *thread, const char *str, u64 timestamp, >

Re: [RFC/PATCH 17/38] perf tools: Maintain map groups list in a leader thread

2015-10-08 Thread Jiri Olsa
On Fri, Oct 02, 2015 at 02:18:58PM +0900, Namhyung Kim wrote: SNIP > int __thread__set_comm(struct thread *thread, const char *str, u64 timestamp, > bool exec) > { > @@ -182,6 +257,40 @@ int __thread__set_comm(struct thread *thread, const char > *str, u64 timestamp, >

[RFC/PATCH 17/38] perf tools: Maintain map groups list in a leader thread

2015-10-01 Thread Namhyung Kim
To support multi-threaded perf report, we need to maintain time-sorted map groups. Add ->mg_list member to struct thread and sort the list by time. Now leader threads have one more refcnt for map groups in the list so also update the thread-mg-share test case. Currently only add a new map

[RFC/PATCH 17/38] perf tools: Maintain map groups list in a leader thread

2015-10-01 Thread Namhyung Kim
To support multi-threaded perf report, we need to maintain time-sorted map groups. Add ->mg_list member to struct thread and sort the list by time. Now leader threads have one more refcnt for map groups in the list so also update the thread-mg-share test case. Currently only add a new map