lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <363DA0ED52042842948283D2FC38E4649C5B1DB0@IRSMSX106.ger.corp.intel.com>
Date:   Fri, 9 Aug 2019 15:20:14 +0000
From:   "Hunter, Adrian" <adrian.hunter@...el.com>
To:     Jiri Olsa <jolsa@...hat.com>
CC:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>,
        Michael Petlan <mpetlan@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [RFC] perf_sample_id::idx

It will be used for AUX area sampling.  A sample will have AUX area data that will be queued for decoding, where there are separate queues for each CPU (per-cpu tracing) or task (per-thread tracing).  The sample ID can be used to lookup 'idx' which is effectively the queue number.

> -----Original Message-----
> From: Jiri Olsa [mailto:jolsa@...hat.com]
> Sent: Friday, August 9, 2019 12:28 PM
> To: Hunter, Adrian <adrian.hunter@...el.com>
> Cc: Arnaldo Carvalho de Melo <acme@...nel.org>; Ingo Molnar
> <mingo@...nel.org>; Namhyung Kim <namhyung@...nel.org>; Alexander
> Shishkin <alexander.shishkin@...ux.intel.com>; Peter Zijlstra
> <a.p.zijlstra@...llo.nl>; Michael Petlan <mpetlan@...hat.com>; linux-
> kernel@...r.kernel.org
> Subject: [RFC] perf_sample_id::idx
> 
> hi,
> what's the perf_sample_id::idx for? It was added in here:
>   3c659eedada2 perf tools: Add id index
> 
> but I dont see any practical usage of it in the sources, when I remove it like
> below, I get clean build
> 
> any idea?
> 
> thanks,
> jirka
> 
> 
> ---
> diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index
> 70841d115349..24b90f68d616 100644
> --- a/tools/perf/util/event.h
> +++ b/tools/perf/util/event.h
> @@ -498,7 +498,7 @@ struct tracing_data_event {
> 
>  struct id_index_entry {
>  	u64 id;
> -	u64 idx;
> +	u64 idx; /* deprecated */
>  	u64 cpu;
>  	u64 tid;
>  };
> diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index
> c4489a1ad6bc..e55133cacb64 100644
> --- a/tools/perf/util/evlist.c
> +++ b/tools/perf/util/evlist.c
> @@ -519,11 +519,11 @@ int perf_evlist__id_add_fd(struct evlist *evlist,  }
> 
>  static void perf_evlist__set_sid_idx(struct evlist *evlist,
> -				     struct evsel *evsel, int idx, int cpu,
> +				     struct evsel *evsel, int cpu,
>  				     int thread)
>  {
>  	struct perf_sample_id *sid = SID(evsel, cpu, thread);
> -	sid->idx = idx;
> +
>  	if (evlist->core.cpus && cpu >= 0)
>  		sid->cpu = evlist->core.cpus->map[cpu];
>  	else
> @@ -795,8 +795,7 @@ static int perf_evlist__mmap_per_evsel(struct evlist
> *evlist, int idx,
>  			if (perf_evlist__id_add_fd(evlist, evsel, cpu, thread,
>  						   fd) < 0)
>  				return -1;
> -			perf_evlist__set_sid_idx(evlist, evsel, idx, cpu,
> -						 thread);
> +			perf_evlist__set_sid_idx(evlist, evsel, cpu, thread);
>  		}
>  	}
> 
> diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h index
> 3cf35aa782b9..b9d864933d75 100644
> --- a/tools/perf/util/evsel.h
> +++ b/tools/perf/util/evsel.h
> @@ -23,7 +23,6 @@ struct perf_sample_id {
>  	struct hlist_node 	node;
>  	u64		 	id;
>  	struct evsel		*evsel;
> -	int			idx;
>  	int			cpu;
>  	pid_t			tid;
> 
> diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index
> b9fe71d11bf6..2642d60aa875 100644
> --- a/tools/perf/util/session.c
> +++ b/tools/perf/util/session.c
> @@ -2394,7 +2394,6 @@ int perf_event__process_id_index(struct
> perf_session *session,
>  		sid = perf_evlist__id2sid(evlist, e->id);
>  		if (!sid)
>  			return -ENOENT;
> -		sid->idx = e->idx;
>  		sid->cpu = e->cpu;
>  		sid->tid = e->tid;
>  	}
> @@ -2454,7 +2453,7 @@ int perf_event__synthesize_id_index(struct
> perf_tool *tool,
>  				return -ENOENT;
>  			}
> 
> -			e->idx = sid->idx;
> +			e->idx = -1;
>  			e->cpu = sid->cpu;
>  			e->tid = sid->tid;
>  		}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ