Maynard Johnson | 11 Jun 2012 17:29
Picon
Favicon

[PATCH] Switch operf from popt to getopt

[PATCH] Switch operf from popt to getopt

Using popt to parse command line arguments for operf did not
work properly for cases where an application to profile is
passed in, along with some app arguments that happen to have
option names the same as operf.  Therefore, operf has been
changed to use getopt_long.  This decision to not use popt
negated the reason for the changes made to oprofile's libopt++
popt_option.[c|h] files back when operf was first introduced;
thus, those changes are reverted with this patch.

This patch has been pushed to the perf-events branch, but review
comments are welcome.

Signed-off-by: Maynard Johnson <maynardj <at> us.ibm.com>

---
 configure.in              |    1 -
 doc/operf.1.in            |    2 +-
 libabi/opimport.cpp       |    2 +-
 libopt++/popt_options.cpp |   38 ++------
 libopt++/popt_options.h   |    5 +-
 pe_profiling/Makefile.am  |    4 +-
 pe_profiling/operf.cpp    |  205 ++++++++++++++++++++++++++++++++++-----------
 pp/common_option.cpp      |    2 +-
 8 files changed, 171 insertions(+), 88 deletions(-)

diff --git a/configure.in b/configure.in
index 5015aad..45b0e23 100644
--- a/configure.in
(Continue reading)


Gmane