This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [RFA] JVMTI Agent Loading
- From: Andrew Haley <aph at redhat dot com>
- To: Kyle Galloway <kgallowa at redhat dot com>
- Cc: tromey at redhat dot com, GCJ-patches <java-patches at gcc dot gnu dot org>
- Date: Tue, 3 Apr 2007 14:42:35 +0100
- Subject: Re: [RFA] JVMTI Agent Loading
- References: <460AC972.5080101@redhat.com> <m3vegi4h2s.fsf@localhost.localdomain> <460D7838.6080306@redhat.com> <m3wt0y313m.fsf@localhost.localdomain> <461256B8.2070905@redhat.com>
Kyle Galloway writes:
> Index: libjava/gij.cc
> ===================================================================
> --- libjava/gij.cc (revision 123426)
> +++ libjava/gij.cc (working copy)
> @@ -121,11 +121,11 @@
> continue;
> else if (! strcmp (arg, "-jrockit"))
> continue;
> - // Ignore JVM Tool Interface options
> + // JVM Tool Interface options
> else if (! strncmp (arg, "-agentlib:", sizeof ("-agentlib:") - 1))
FYI -- and not theis is not an objection to your patch --
strlen("-agentlib:") would be more idiomatic and just as efficient.
"sizeof is faster than strlen()" is one of those urban legends that
will never die...
Andrew.
--
Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK
Registered in England and Wales No. 3798903