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: <20131211195546.GG1458@ghostprotocols.net>
Date:	Wed, 11 Dec 2013 16:55:46 -0300
From:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
To:	David Ahern <dsahern@...il.com>
Cc:	Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
	Frederic Weisbecker <fweisbec@...il.com>,
	Jiri Olsa <jolsa@...hat.com>, Mike Galbraith <efault@....de>,
	Namhyung Kim <namhyung@...il.com>,
	Paul Mackerras <paulus@...ba.org>,
	Stephane Eranian <eranian@...gle.com>,
	Andi Kleen <ak@...ux.intel.com>,
	Adrian Hunter <adrian.hunter@...el.com>
Subject: Re: [PATCH v0 14/71] perf tools: Add cpu to struct thread

Em Wed, Dec 11, 2013 at 12:30:40PM -0700, David Ahern escreveu:
> On 12/11/13, 5:36 AM, Alexander Shishkin wrote:
> 
> >diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
> >index 55f3608..52fbfb6 100644
> >--- a/tools/perf/util/machine.c
> >+++ b/tools/perf/util/machine.c
> >@@ -1412,3 +1412,29 @@ pid_t machine__get_thread_pid(struct machine *machine, pid_t tid)
> >
> >  	return thread->pid_;
> >  }
> >+
> >+int machine__get_thread_cpu(struct machine *machine, pid_t tid, pid_t *pid)
> >+{
> >+	struct thread *thread = machine__find_thread(machine, tid);
> >+
> >+	if (!thread)
> >+		return -1;
> >+
> >+	if (pid)
> >+		*pid = thread->pid_;
> 
> Why is a 'get' function modifying the thread data?

Where is this happening? :-)

My main complaint here was that we would be getting more things than
what the function name implies, see another message with my reply to
this patch.

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ