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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140219024546.GL25953@redhat.com>
Date:	Tue, 18 Feb 2014 21:45:46 -0500
From:	Don Zickus <dzickus@...hat.com>
To:	Jiri Olsa <jolsa@...hat.com>
Cc:	acme@...stprotocols.net, LKML <linux-kernel@...r.kernel.org>,
	jmario@...hat.com, fowles@...each.com, eranian@...gle.com
Subject: Re: [PATCH 08/21] perf, c2c: Rework setup code to prepare for
 features

On Tue, Feb 18, 2014 at 02:02:23PM +0100, Jiri Olsa wrote:
> On Mon, Feb 10, 2014 at 12:29:03PM -0500, Don Zickus wrote:
> > A basic patch that re-arranges some of the c2c code and adds a couple
> > of small features to lay the ground work for the rest of the patch
> > series.
> > 
> > Changes include:
> > 
> > o reworking the report path
> > o creating an initial entry struct
> > o replace preprocess_sample with simpler calls
> > o rework raw output to handle separators
> > o remove phys id gunk
> > o add some generic options
> > 
> > There isn't much meat in this patch just a bunch of code movement and cleanups.
> > 
> > Signed-off-by: Don Zickus <dzickus@...hat.com>
> > ---
> 
> SNIP
> 
> >  static int perf_c2c__process_sample(struct perf_tool *tool,
> >  				    union perf_event *event,
> > @@ -153,20 +198,63 @@ static int perf_c2c__process_sample(struct perf_tool *tool,
> >  				    struct machine *machine)
> >  {
> >  	struct perf_c2c *c2c = container_of(tool, struct perf_c2c, tool);
> > -	struct addr_location al;
> > -	int err = 0;
> > +	u8 cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK;
> > +	struct mem_info *mi;
> > +	struct thread *thread;
> > +	struct c2c_entry *entry;
> > +	sample_handler f;
> > +	int err = -1;
> > +
> > +	if (evsel->handler.func == NULL)
> > +		return 0;
> > +
> > +	thread = machine__find_thread(machine, sample->tid);
> > +	if (thread == NULL)
> > +		goto err;
> > +
> > +	mi = machine__resolve_mem(machine, thread, sample, cpumode);
> > +	if (mi == NULL)
> > +		goto err;
> >  
> > -	if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) {
> > -		pr_err("problem processing %d event, skipping it.\n",
> > -		       event->header.type);
> > -		return -1;
> > +	if (c2c->raw_records) {
> > +		perf_sample__fprintf(sample, ' ', "raw input", mi, stdout);
> > +		free(mi);
> > +		return 0;
> >  	}
> >  
> > -	if (evsel->handler.func != NULL) {
> > -		sample_handler f = evsel->handler.func;
> > -		err = f(c2c, sample, &al);
> > +	entry = c2c_entry__new(sample, thread, mi, cpumode);
> > +	if (entry == NULL)
> > +		goto err_mem;
> > +
> > +	f = evsel->handler.func;
> > +	err = f(c2c, sample, entry);
> > +	if (err)
> > +		goto err_entry;
> > +
> > +	return 0;
> 
> this looks like new mode for namhyung's iterator patchset
> http://marc.info/?l=linux-kernel&m=138967747319160&w=2
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git
> perf/cumulate-v8

I'll take a look at it and seem what is useful for me.  Thanks!

Cheers,
Don
--
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