[eclipseoprofile-cvs] org.eclipse.cdt.oprofile/org.eclipse.cdt.oprofile.core.linux/src/org/eclipse/c
Brought to you by:
jhandcock
From: Jeremy H. <jha...@us...> - 2006-05-02 01:37:35
|
Update of /cvsroot/eclipseoprofile/org.eclipse.cdt.oprofile/org.eclipse.cdt.oprofile.core.linux/src/org/eclipse/cdt/oprofile/core/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27568a/org.eclipse.cdt.oprofile.core.linux/src/org/eclipse/cdt/oprofile/core/linux Modified Files: ChangeLog LinuxOpcontrolProvider.java OpxmlRunner.java Log Message: Adding patch from Keith Seitz from Eclipse.org repository Index: OpxmlRunner.java =================================================================== RCS file: /cvsroot/eclipseoprofile/org.eclipse.cdt.oprofile/org.eclipse.cdt.oprofile.core.linux/src/org/eclipse/cdt/oprofile/core/linux/OpxmlRunner.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** OpxmlRunner.java 13 Oct 2004 07:24:35 -0000 1.2 --- OpxmlRunner.java 2 May 2006 01:37:25 -0000 1.3 *************** *** 11,14 **** --- 11,15 ---- import java.io.InputStreamReader; import java.net.URL; + import javax.xml.parsers.SAXParserFactory; import org.eclipse.cdt.oprofile.core.Oprofile; *************** *** 21,25 **** import org.xml.sax.SAXException; import org.xml.sax.XMLReader; - import org.xml.sax.helpers.XMLReaderFactory; /** --- 22,25 ---- *************** *** 64,70 **** try { // Create XMLReader ! reader = XMLReaderFactory.createXMLReader(); ! } catch (SAXException e1) { ! // FIXME error? Exception? } --- 64,71 ---- try { // Create XMLReader ! SAXParserFactory factory = SAXParserFactory.newInstance (); ! reader = factory.newSAXParser ().getXMLReader (); ! } catch (Exception e) { ! System.out.println ("Exception creating SAXParser: " + e.getMessage ()); } Index: LinuxOpcontrolProvider.java =================================================================== RCS file: /cvsroot/eclipseoprofile/org.eclipse.cdt.oprofile/org.eclipse.cdt.oprofile.core.linux/src/org/eclipse/cdt/oprofile/core/linux/LinuxOpcontrolProvider.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** LinuxOpcontrolProvider.java 14 Apr 2005 18:40:15 -0000 1.3 --- LinuxOpcontrolProvider.java 2 May 2006 01:37:25 -0000 1.4 *************** *** 84,87 **** --- 84,90 ---- private static final String _OPD_DEINIT_MODULE = "--deinit"; + // Logging verbosity. Specified with setupDaemon. + private String _verbosity = null; + /** * Unload the kernel module and oprofilefs *************** *** 186,189 **** --- 189,200 ---- private void _runOpcontrol(ArrayList args, boolean drainOutput) throws OpcontrolException { args.add(0, _OPCONTROL_PROGRAM); + // Verbosity hack. If --start or --start-daemon, add verbosity, if set + String cmd = (String) args.get(1); + if ((cmd.equals (_OPD_START_COLLECTION) || cmd.equals(_OPD_START_DAEMON)) + && _verbosity != null) + { + args.add(_verbosity); + } + String[] cmdArray = new String[args.size()]; args.toArray(cmdArray); *************** *** 284,290 **** } ! // Add verbosity (only support "all" now) if (options.getVerboseLogging()) { ! args.add(_OPD_VERBOSE_LOGGING + _OPD_VERBOSE_ALL); } } --- 295,301 ---- } ! // Note verbosity (only support "all" now) if (options.getVerboseLogging()) { ! _verbosity = _OPD_VERBOSE_LOGGING + _OPD_VERBOSE_ALL; } } Index: ChangeLog =================================================================== RCS file: /cvsroot/eclipseoprofile/org.eclipse.cdt.oprofile/org.eclipse.cdt.oprofile.core.linux/src/org/eclipse/cdt/oprofile/core/linux/ChangeLog,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ChangeLog 14 Apr 2005 18:40:15 -0000 1.3 --- ChangeLog 2 May 2006 01:37:25 -0000 1.4 *************** *** 1,2 **** --- 1,12 ---- + 2006-04-28 Keith Seitz <ke...@re...> + + * LinuxOpcontrolProvider.java (_verbosity): New private member. + (_runOpcontrol): When running with --start or --start-daemon, + add verbosity flag. + (_optionsToArguments): Don't append verbosity. Just save the value. + + * OpxmlRunner.java (run): Use javax.xml.parsers.SAXParserFactory + instead of org.xml.sax.helpers.XMLReaderFactory. + 2005-04-14 Keith Seitz <ke...@re...> |