[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: glibc build process slowness
From: |
Jakub Jelinek |
Subject: |
Re: glibc build process slowness |
Date: |
Mon, 26 Feb 2007 11:57:29 +0100 |
User-agent: |
Mutt/1.4.2.2i |
On Sun, Feb 25, 2007 at 09:18:27PM -0500, Paul Smith wrote:
> On Wed, 2007-02-21 at 20:15 +0000, Mark Seaborn wrote:
>
> > I profiled make. It's spending around 60% of the time in
> > new_pattern_rule(), which does a linear search through the list of
> > pattern rules to check for duplicate rules. glibc generates ~2500
> > rules (in sysd-rules).
>
> Holy moly! How in the world do you get that many pattern rules?!?! The
> point of pattern rules is that they represent an entire class of
> targets, which means you typically would have orders of magnitude fewer
> pattern rules than you have targets.
Several pattern rules for each directory in which sources should be looked up.
There are usually 30-40 directories in which files should be searched
and glibc needs a well defined order how to pick up the desired source
location for particular object file. E.g. pick .S in preference of .s,
then .c, repeated by several different prefixes (none, rtld-, ptw-, m_),
times the number of different object file types (.o, .os, .og, .op, .oS).
So that is 5 * 4 * 3 * 30 at minimum.
...
$(objpfx)%.o: $(..)sysdeps/pthread/%.S $(before-compile);
$(compile-command.S)
$(objpfx)%.o: $(..)sysdeps/pthread/%.s $(before-compile);
$(compile-command.s)
$(objpfx)rtld-%.o: $(..)sysdeps/pthread/%.S $(before-compile);
$(compile-command.S)
$(objpfx)rtld-%.o: $(..)sysdeps/pthread/%.s $(before-compile);
$(compile-command.s)
$(objpfx)ptw-%.o: $(..)sysdeps/pthread/%.S $(before-compile);
$(compile-command.S)
$(objpfx)ptw-%.o: $(..)sysdeps/pthread/%.s $(before-compile);
$(compile-command.s)
$(objpfx)m_%.o: $(..)sysdeps/pthread/s_%.S $(before-compile);
$(compile-command.S)
$(objpfx)m_%.o: $(..)sysdeps/pthread/s_%.s $(before-compile);
$(compile-command.s)
$(objpfx)%.o: $(..)sysdeps/pthread/%.c $(before-compile);
$(compile-command.c)
$(objpfx)rtld-%.o: $(..)sysdeps/pthread/%.c $(before-compile);
$(compile-command.c)
$(objpfx)ptw-%.o: $(..)sysdeps/pthread/%.c $(before-compile);
$(compile-command.c)
$(objpfx)m_%.o: $(..)sysdeps/pthread/s_%.c $(before-compile);
$(compile-command.c)
$(objpfx)%.os: $(..)sysdeps/pthread/%.S $(before-compile);
$(compile-command.S)
$(objpfx)%.os: $(..)sysdeps/pthread/%.s $(before-compile);
$(compile-command.s)
$(objpfx)rtld-%.os: $(..)sysdeps/pthread/%.S $(before-compile);
$(compile-command.S)
$(objpfx)rtld-%.os: $(..)sysdeps/pthread/%.s $(before-compile);
$(compile-command.s)
$(objpfx)ptw-%.os: $(..)sysdeps/pthread/%.S $(before-compile);
$(compile-command.S)
$(objpfx)ptw-%.os: $(..)sysdeps/pthread/%.s $(before-compile);
$(compile-command.s)
$(objpfx)m_%.os: $(..)sysdeps/pthread/s_%.S $(before-compile);
$(compile-command.S)
$(objpfx)m_%.os: $(..)sysdeps/pthread/s_%.s $(before-compile);
$(compile-command.s)
$(objpfx)%.os: $(..)sysdeps/pthread/%.c $(before-compile);
$(compile-command.c)
$(objpfx)rtld-%.os: $(..)sysdeps/pthread/%.c $(before-compile);
$(compile-command.c)
$(objpfx)ptw-%.os: $(..)sysdeps/pthread/%.c $(before-compile);
$(compile-command.c)
$(objpfx)m_%.os: $(..)sysdeps/pthread/s_%.c $(before-compile);
$(compile-command.c)
$(objpfx)%.op: $(..)sysdeps/pthread/%.S $(before-compile);
$(compile-command.S)
$(objpfx)%.op: $(..)sysdeps/pthread/%.s $(before-compile);
$(compile-command.s)
$(objpfx)rtld-%.op: $(..)sysdeps/pthread/%.S $(before-compile);
$(compile-command.S)
$(objpfx)rtld-%.op: $(..)sysdeps/pthread/%.s $(before-compile);
$(compile-command.s)
$(objpfx)ptw-%.op: $(..)sysdeps/pthread/%.S $(before-compile);
$(compile-command.S)
$(objpfx)ptw-%.op: $(..)sysdeps/pthread/%.s $(before-compile);
$(compile-command.s)
$(objpfx)m_%.op: $(..)sysdeps/pthread/s_%.S $(before-compile);
$(compile-command.S)
$(objpfx)m_%.op: $(..)sysdeps/pthread/s_%.s $(before-compile);
$(compile-command.s)
$(objpfx)%.op: $(..)sysdeps/pthread/%.c $(before-compile);
$(compile-command.c)
$(objpfx)rtld-%.op: $(..)sysdeps/pthread/%.c $(before-compile);
$(compile-command.c)
$(objpfx)ptw-%.op: $(..)sysdeps/pthread/%.c $(before-compile);
$(compile-command.c)
$(objpfx)m_%.op: $(..)sysdeps/pthread/s_%.c $(before-compile);
$(compile-command.c)
$(objpfx)%.og: $(..)sysdeps/pthread/%.S $(before-compile);
$(compile-command.S)
$(objpfx)%.og: $(..)sysdeps/pthread/%.s $(before-compile);
$(compile-command.s)
...
and so on.
Jakub
- glibc build process slowness, Mark Seaborn, 2007/02/21
- Re: glibc build process slowness, Roland McGrath, 2007/02/21
- [PATCH 0/5] Improve performance of rule handling, Mark Seaborn, 2007/02/25
- [PATCH 3/5] Refactor: Use a doubly-linked list of rules instead of a singly-linked list, Mark Seaborn, 2007/02/25
- [PATCH 1/5] Refactor: Move rule comparisons into separate functions, Mark Seaborn, 2007/02/25
- [PATCH 2/5] Clean up count_implicit_rule_limits(), Mark Seaborn, 2007/02/25
- [PATCH 4/5] Record rule targets in a hash table, Mark Seaborn, 2007/02/25
- [PATCH 5/5] Hook up hash table: use for searching for rules to replace, Mark Seaborn, 2007/02/25
- Re: glibc build process slowness, Paul Smith, 2007/02/25
- Re: glibc build process slowness,
Jakub Jelinek <=