Powered by Linux
Re: [xen 1/6] math: increase bounds and buffers — Semantic Matching Tool

Re: [xen 1/6] math: increase bounds and buffers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Dan,

rather than fixing a single limit as in this case, I'd be interested in
adding another command line parameter that controls all the limits at
once, and would allow them to be increased based on users demand. This
could be useful for runs where I'm interested in more results and do not
care about run time (e.g. because I run over night or the weekend).

Is there a simple way to spot all the used limits, or can you point the
relevant places so that I can adapt the tool appropriately? Thanks!

Best,
Norbert

On 08/14/2018 08:06 PM, Norbert Manthey wrote:
> When searching through the smatch code, I found these places and just
> increased the two things. Not to solve a specific issue, just to abort
> later. I cannot tell whether that actually makes a difference. However,
> as run time is not too critical during compilation, I'm happy to spend
> the extra cycles to get more out of the analysis.
> 
> On 08/14/2018 06:35 PM, Dan Carpenter wrote:
>> On Tue, Aug 14, 2018 at 05:00:53PM +0200, Norbert Manthey wrote:
>>> To get more out of the analysis, increase some buffers and limits.
>>>
>>> Signed-off-by: Norbert Manthey <nmanthey@xxxxxxxxx>
>>> ---
>>>  smatch_math.c | 4 ++--
>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/smatch_math.c b/smatch_math.c
>>> index de9f6c0..fef2baf 100644
>>> --- a/smatch_math.c
>>> +++ b/smatch_math.c
>>> @@ -1137,7 +1137,7 @@ static struct range_list *_get_rl(struct expression *expr, int implied, int *rec
>>>  	if (!expr)
>>>  		return NULL;
>>>  
>>> -	if (++(*recurse_cnt) >= 200)
>>> +	if (++(*recurse_cnt) >= 500)
>>>  		return NULL;
>>
>> Hopefully, this doesn't matter.  If it does then probably we should look
>> at a different way to fix the problem.
>>
>>>  
>>>  	switch(expr->type) {
>>> @@ -1199,7 +1199,7 @@ out_cast:
>>>  struct {
>>>  	struct expression *expr;
>>>  	struct range_list *rl;
>>> -} cached_results[24];
>>> +} cached_results[72];
>>
>> The idea here would be that this is a speed up.  Does it really make a
>> difference?
>>
>> regards,
>> dan carpenter
>>
>>
Amazon Development Center Germany GmbH
Berlin - Dresden - Aachen
main office: Krausenstr. 38, 10117 Berlin
Geschaeftsfuehrer: Dr. Ralf Herbrich, Christian Schlaeger
Ust-ID: DE289237879
Eingetragen am Amtsgericht Charlottenburg HRB 149173 B




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux