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: <CAM9d7cgxabLGmNN_YhmnN8tkfZmhq2Bww9s=ruT40Wnxg-TY-g@mail.gmail.com>
Date:	Tue, 18 Mar 2014 23:20:28 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Arnaldo Carvalho de Melo <acme@...hat.com>
Cc:	Don Zickus <dzickus@...hat.com>, Jiri Olsa <jolsa@...hat.com>,
	jmario@...hat.com, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V2] perf: Speed up thread map generation

On Tue, Mar 18, 2014 at 10:43 PM, Arnaldo Carvalho de Melo
<acme@...hat.com> wrote:
> Em Mon, Mar 17, 2014 at 10:45:49AM +0900, Namhyung Kim escreveu:
>> Hi Don,
>>
>> On Fri, 14 Mar 2014 10:43:44 -0400, Don Zickus wrote:
>> > When trying to capture perf data on a system running spejbb2013,
>> > perf hung for about 15 minutes.  This is because it took that
>> > long to gather about 10,000 thread maps and process them.
>> >
>> > I don't think a user wants to wait that long.
>> >
>> > Instead, recognize that thread maps are roughly equivalent to
>> > pid maps and just quickly copy those instead.
>> >
>> > To do this, I synthesize 'fork' events, this eventually calls
>> > thread__fork() and copies the maps over.
>> >
>> > The overhead goes from 15 minutes down to about a few seconds.
>>
>> [SNIP]
>> > @@ -416,6 +453,10 @@ int perf_event__synthesize_threads(struct perf_tool *tool,
>> >     if (mmap_event == NULL)
>> >             goto out_free_comm;
>> >
>> > +   fork_event = malloc(sizeof(fork_event->fork) + machine->id_hdr_size);
>> > +   if (fork_event == NULL)
>> > +           goto out_free_mmap;
>> > +
>> >     if (machine__is_default_guest(machine))
>> >             return 0;
>>
>> Not related to this patch, but this will causes a memory leak..
>> So I think below patch is needed on top (not sure it's also needed for
>> perf_event__synthesize_thread_map() too).
>
> Good catch, applying it, please next time send it under separate cover,
> i.e. not inside another thread.

Okay.  I'll send this kind of patch in a separate thread next time.

Thanks,
Namhyung
--
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