All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kbuild: incremental tags updating with GNU GLOBAL
@ 2011-07-11 10:26 Víctor Manuel Jáquez Leal
  2011-07-11 12:17 ` Michal Marek
  0 siblings, 1 reply; 5+ messages in thread
From: Víctor Manuel Jáquez Leal @ 2011-07-11 10:26 UTC (permalink / raw)
  To: Michal Marek; +Cc: linux-kernel, linux-kbuild, Jianbin Kang, Sam Ravnborg

Instead of generating the tag database each time the target is ran, is better
just update incrementally the database. It will expend less time.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
---
 scripts/tags.sh |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/scripts/tags.sh b/scripts/tags.sh
index 75c5d24..6a2fedc 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -116,7 +116,11 @@ docscope()
 
 dogtags()
 {
-	all_sources | gtags -f -
+	if global -p; then
+		global -u
+	else
+		all_sources | gtags -f -
+	fi
 }
 
 exuberant()
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] kbuild: incremental tags updating with GNU GLOBAL
  2011-07-11 10:26 [PATCH] kbuild: incremental tags updating with GNU GLOBAL Víctor Manuel Jáquez Leal
@ 2011-07-11 12:17 ` Michal Marek
  2011-07-11 13:17   ` Víctor M. Jáquez L.
  0 siblings, 1 reply; 5+ messages in thread
From: Michal Marek @ 2011-07-11 12:17 UTC (permalink / raw)
  To: Víctor Manuel Jáquez Leal
  Cc: linux-kernel, linux-kbuild, Jianbin Kang, Sam Ravnborg

On 11.7.2011 12:26, Víctor Manuel Jáquez Leal wrote:
> Instead of generating the tag database each time the target is ran, is better
> just update incrementally the database. It will expend less time.
>
> Signed-off-by: Víctor Manuel Jáquez Leal<vjaquez@igalia.com>
> ---
>   scripts/tags.sh |    6 +++++-
>   1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/scripts/tags.sh b/scripts/tags.sh
> index 75c5d24..6a2fedc 100755
> --- a/scripts/tags.sh
> +++ b/scripts/tags.sh
> @@ -116,7 +116,11 @@ docscope()
>
>   dogtags()
>   {
> -	all_sources | gtags -f -
> +	if global -p; then
> +		global -u
> +	else
> +		all_sources | gtags -f -
> +	fi

Will this handle new source files properly?

Michal

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] kbuild: incremental tags updating with GNU GLOBAL
  2011-07-11 12:17 ` Michal Marek
@ 2011-07-11 13:17   ` Víctor M. Jáquez L.
  2011-07-25 13:20     ` Michal Marek
  0 siblings, 1 reply; 5+ messages in thread
From: Víctor M. Jáquez L. @ 2011-07-11 13:17 UTC (permalink / raw)
  To: Michal Marek; +Cc: linux-kernel, linux-kbuild, Jianbin Kang, Sam Ravnborg

On Mon, Jul 11, 2011 at 02:17:38PM +0200, Michal Marek wrote:
> On 11.7.2011 12:26, Víctor Manuel Jáquez Leal wrote:
> >Instead of generating the tag database each time the target is ran, is better
> >just update incrementally the database. It will expend less time.
> >
> >Signed-off-by: Víctor Manuel Jáquez Leal<vjaquez@igalia.com>
> >---
> >  scripts/tags.sh |    6 +++++-
> >  1 files changed, 5 insertions(+), 1 deletions(-)
> >
> >diff --git a/scripts/tags.sh b/scripts/tags.sh
> >index 75c5d24..6a2fedc 100755
> >--- a/scripts/tags.sh
> >+++ b/scripts/tags.sh
> >@@ -116,7 +116,11 @@ docscope()
> >
> >  dogtags()
> >  {
> >-	all_sources | gtags -f -
> >+	if global -p; then
> >+		global -u
> >+	else
> >+		all_sources | gtags -f -
> >+	fi
> 
> Will this handle new source files properly?

I ran a quick test and yes, it does.

vmjl

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] kbuild: incremental tags updating with GNU GLOBAL
  2011-07-11 13:17   ` Víctor M. Jáquez L.
@ 2011-07-25 13:20     ` Michal Marek
  2011-07-25 13:37       ` Víctor M. Jáquez L.
  0 siblings, 1 reply; 5+ messages in thread
From: Michal Marek @ 2011-07-25 13:20 UTC (permalink / raw)
  To: Víctor M. Jáquez L.
  Cc: linux-kernel, linux-kbuild, Jianbin Kang, Sam Ravnborg

On Mon, Jul 11, 2011 at 03:17:25PM +0200, Víctor M. Jáquez L. wrote:
> On Mon, Jul 11, 2011 at 02:17:38PM +0200, Michal Marek wrote:
> > On 11.7.2011 12:26, Víctor Manuel Jáquez Leal wrote:
> > >Instead of generating the tag database each time the target is ran, is better
> > >just update incrementally the database. It will expend less time.
> > >
> > >Signed-off-by: Víctor Manuel Jáquez Leal<vjaquez@igalia.com>
> > >---
> > >  scripts/tags.sh |    6 +++++-
> > >  1 files changed, 5 insertions(+), 1 deletions(-)
> > >
> > >diff --git a/scripts/tags.sh b/scripts/tags.sh
> > >index 75c5d24..6a2fedc 100755
> > >--- a/scripts/tags.sh
> > >+++ b/scripts/tags.sh
> > >@@ -116,7 +116,11 @@ docscope()
> > >
> > >  dogtags()
> > >  {
> > >-	all_sources | gtags -f -
> > >+	if global -p; then
> > >+		global -u
> > >+	else
> > >+		all_sources | gtags -f -
> > >+	fi
> > 
> > Will this handle new source files properly?
> 
> I ran a quick test and yes, it does.

I installed global and tried it myself:
1) The first 'make gtags' run prints a rather confusing message (fixable)
 $ make gtags
   GEN     gtags
   global: GTAGS not found.
 $
2) A second run indexes the _whole_ tree, including everything under
arch/. The point of the tags.sh script is that it indexes only files
relevant to the current architecture. If someone wants to index the
whole tree, they can run global directly.

Michal

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] kbuild: incremental tags updating with GNU GLOBAL
  2011-07-25 13:20     ` Michal Marek
@ 2011-07-25 13:37       ` Víctor M. Jáquez L.
  0 siblings, 0 replies; 5+ messages in thread
From: Víctor M. Jáquez L. @ 2011-07-25 13:37 UTC (permalink / raw)
  To: Michal Marek; +Cc: linux-kernel, linux-kbuild, Jianbin Kang, Sam Ravnborg

On Mon, Jul 25, 2011 at 03:20:40PM +0200, Michal Marek wrote:
> On Mon, Jul 11, 2011 at 03:17:25PM +0200, Víctor M. Jáquez L. wrote:
> > On Mon, Jul 11, 2011 at 02:17:38PM +0200, Michal Marek wrote:
> > > On 11.7.2011 12:26, Víctor Manuel Jáquez Leal wrote:
> > > >Instead of generating the tag database each time the target is ran, is better
> > > >just update incrementally the database. It will expend less time.
> > > >
> > > >Signed-off-by: Víctor Manuel Jáquez Leal<vjaquez@igalia.com>
> > > >---
> > > >  scripts/tags.sh |    6 +++++-
> > > >  1 files changed, 5 insertions(+), 1 deletions(-)
> > > >
> > > >diff --git a/scripts/tags.sh b/scripts/tags.sh
> > > >index 75c5d24..6a2fedc 100755
> > > >--- a/scripts/tags.sh
> > > >+++ b/scripts/tags.sh
> > > >@@ -116,7 +116,11 @@ docscope()
> > > >
> > > >  dogtags()
> > > >  {
> > > >-	all_sources | gtags -f -
> > > >+	if global -p; then
> > > >+		global -u
> > > >+	else
> > > >+		all_sources | gtags -f -
> > > >+	fi
> > > 
> > > Will this handle new source files properly?
> > 
> > I ran a quick test and yes, it does.
> 
> I installed global and tried it myself:

Thanks a lot for the review and the testing!

> 1) The first 'make gtags' run prints a rather confusing message (fixable)
>  $ make gtags
>    GEN     gtags
>    global: GTAGS not found.
>  $

yep, I guess a 2>&1 > /dev/null could do it

> 2) A second run indexes the _whole_ tree, including everything under
> arch/. The point of the tags.sh script is that it indexes only files
> relevant to the current architecture. If someone wants to index the
> whole tree, they can run global directly.

nice catch! 

Well, that makes this patch a bit pointless :( 

Thanks again for the review and sorry for noise.

vmjl

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-07-25 13:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-11 10:26 [PATCH] kbuild: incremental tags updating with GNU GLOBAL Víctor Manuel Jáquez Leal
2011-07-11 12:17 ` Michal Marek
2011-07-11 13:17   ` Víctor M. Jáquez L.
2011-07-25 13:20     ` Michal Marek
2011-07-25 13:37       ` Víctor M. Jáquez L.

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.