lkml.org 
[lkml]   [2009]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/4] gcov: add gcov profiling infrastructure
On Wed, Jun 03, 2009 at 05:26:22PM +0200, Peter Oberparleiter wrote:
>Peter Oberparleiter wrote:
>> Andrew Morton wrote:
>>> On Tue, 02 Jun 2009 13:44:02 +0200
>>> Peter Oberparleiter <oberpar@linux.vnet.ibm.com> wrote:
>>>> + /* Duplicate gcov_info. */
>>>> + active = num_counter_active(info);
>>>> + dup = kzalloc(sizeof(struct gcov_info) +
>>>> + sizeof(struct gcov_ctr_info) * active, GFP_KERNEL);
>>>
>>> How large can this allocation be?
>>
>> Hm, good question. Having a look at my test system, I see coverage data
>> files of up to 60kb size. With counters making up the largest part of
>> those, I'd guess the allocation size can be around ~55kb. I assume that
>> makes it a candidate for vmalloc?
>
>A further run with debug output showed that the maximum size is
>actually around 4k, so in my opinion, there is no need to switch
>to vmalloc.

Unless you want virtually continious memory, you don't need to
bother vmalloc().

kmalloc() and get_free_pages() are all fine for this.


\
 
 \ /
  Last update: 2009-06-04 11:09    [W:0.109 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site