linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-sparse@vger.kernel.org
Subject: Re: sparse using insane amounts of memory
Date: Thu, 08 Mar 2007 12:13:30 -0500	[thread overview]
Message-ID: <1173374010.15842.13.camel@dv> (raw)
In-Reply-To: <1173372315.3248.19.camel@johannes.berg>

[Dropping linux-wireless, as there is nothing wireless below]

On Thu, 2007-03-08 at 17:45 +0100, Johannes Berg wrote:
>   make CC="gcc -save-temps -D__CHECKER__" KBUILD_NOCMDDEP=1 M=drivers/net/wireless/mac80211/rt2x00/
> 
> and aborted when I got lots of errors, rt2400pci.i was created and has
> about 26k lines. Running sparse on it (sparse rt2400pci.i) takes a lot
> of memory too. I put the file up at
> http://johannes.sipsolutions.net/files/rt2400pci.i

Thanks!  I see it now.  Sparse is taking about 700M on x86 and 1100M on
x86_64, which is much more than it uses for other files.

Valgrind reports something interesting, but not necessarily related to
the memory hogging:

==15775== Warning: invalid file descriptor -1 in syscall read()
==15775== Source and destination overlap in memcpy(0xBEFA84B4, 0xBEFA84D0, 48)
==15775==    at 0x4007242: memcpy (mc_replace_strmem.c:402)
==15775==    by 0x805E5CB: sort_list (sort.c:207)
==15775==    by 0x8061D7C: cleanup_and_cse (cse.c:247)
==15775==    by 0x805DE7B: linearize_symbol (linearize.c:2147)
==15775==    by 0x804AEC2: check_symbols (sparse.c:266)
==15775==    by 0x804B296: main (sparse.c:284)

If sparse is compiled without optimization, the "overlap" warning is not
reported.  I think it can be ignored.

It takes several minutes for sparse to process rt2400pci.i under
valgrind.  I haven't tried looking for leaks yet.

Reducing the file may be tricky, since there is no definite way to say
if the problem exists once the code becomes shorter.  But I'll try.

-- 
Regards,
Pavel Roskin

  reply	other threads:[~2007-03-08 17:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-08  2:02 sparse using insane amounts of memory Johannes Berg
     [not found] ` <1173319356.3546.54.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2007-03-08 16:33   ` Pavel Roskin
2007-03-08 16:45     ` Johannes Berg
2007-03-08 17:13       ` Pavel Roskin [this message]
2007-03-08 17:31         ` Chris Wedgwood
2007-03-08 17:43         ` Linus Torvalds
     [not found]       ` <1173372315.3248.19.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2007-03-08 17:34         ` Pavel Roskin
2007-03-08 17:42           ` Johannes Berg
2007-03-08 17:43           ` Johannes Berg
2007-03-08 18:08             ` Ivo van Doorn
2007-03-08 18:54               ` Linus Torvalds
     [not found]                 ` <Pine.LNX.4.64.0703081023490.10832-5CScLwifNT1QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
2007-03-08 19:02                   ` Sam Ravnborg
2007-03-08 19:08                   ` Linus Torvalds
     [not found]                     ` <Pine.LNX.4.64.0703081104010.10832-5CScLwifNT1QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
2007-03-10  5:05                       ` Darren Jenkins
2007-03-08 19:26                   ` Ivo van Doorn
2007-03-09  1:12                 ` OT [Re: sparse using insane amounts of memory] Tommy Thorn
2007-03-09  2:15                   ` OT David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1173374010.15842.13.camel@dv \
    --to=proski@gnu.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-sparse@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).