This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] JVMTI Agent Loading


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]