Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1165488

Re: [PATCH 03/30] perf tools: Change thread_map::map into struct

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Arnaldo Carvalho de Melo <acme@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 03/30] perf tools: Change thread_map::map into struct
Date Mon, 15 Jun 2015 21:10:04 +0200
Message-ID <pBHVG-40I-47@gated-at.bofh.it> (permalink)
References <pBbsJ-6AA-3@gated-at.bofh.it> <pBbsL-6AA-37@gated-at.bofh.it>
X-Original-To Jiri Olsa <jolsa@kernel.org>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
X-URL http://acmel.wordpress.com
User-Agent Mutt/1.5.23 (2014-03-12)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 40
Organization linux.* mail to news gateway
X-Original-Cc lkml <linux-kernel@vger.kernel.org>, Adrian Hunter <adrian.hunter@intel.com>, Andi Kleen <ak@linux.intel.com>, David Ahern <dsahern@gmail.com>, Ingo Molnar <mingo@kernel.org>, Namhyung Kim <namhyung@kernel.org>, Peter Zijlstra <a.p.zijlstra@chello.nl>, Stephane Eranian <eranian@google.com>
X-Original-Date Mon, 15 Jun 2015 16:04:04 -0300
X-Original-Message-ID <20150615190404.GC5845@kernel.org>
X-Original-References <1434269985-521-1-git-send-email-jolsa@kernel.org> <1434269985-521-4-git-send-email-jolsa@kernel.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref aioe.org linux.kernel:1165488

Show key headers only | View raw


Em Sun, Jun 14, 2015 at 10:19:18AM +0200, Jiri Olsa escreveu:
> We need to store command names with the pid. Changing
> map to be struct holding pid. Process name is coming
> in shortly.

<SNIP>
 
> +++ b/tools/perf/util/thread_map.h
> @@ -4,11 +4,17 @@
>  #include <sys/types.h>
>  #include <stdio.h>
>  
> +struct thread_map_data {
> +	pid_t    pid;
> +};
> +

What 'data' is this? That is way vague term.

 Will try looking at the other patches to try to suggest some other name
for this :-\

>  struct thread_map {
>  	int nr;
> -	pid_t map[];
> +	struct thread_map_data map[];
>  };
>  
> +#define thread_map__pid(__m, __t)  __m->map[__t].pid
> +
>  struct thread_map *thread_map__new_dummy(void);
>  struct thread_map *thread_map__new_by_pid(pid_t pid);
>  struct thread_map *thread_map__new_by_tid(pid_t tid);
> -- 
> 1.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH 03/30] perf tools: Change thread_map::map into struct Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-06-15 21:10 +0200

csiph-web