[PATCH 7/8] perf tools: Fix bug when --raw-dump is not the first arguement for perf list.

From: Dongsheng Yang
Date: Sun Dec 29 2013 - 21:37:00 EST

As we use PARSE_OPT_STOP_AT_NON_OPTION option in parse_option(), if --raw-dump
is not the first argument, it will be treat as an argument rather than option.

# ./perf list kvmmmu --raw-dump
kvmmmu:kvm_mmu_pagetable_walk [Tracepoint event]
kvmmmu:kvm_mmu_paging_element [Tracepoint event]
kvmmmu:kvm_mmu_set_accessed_bit [Tracepoint event]
kvmmmu:kvm_mmu_set_dirty_bit [Tracepoint event]
kvmmmu:kvm_mmu_walker_error [Tracepoint event]
kvmmmu:kvm_mmu_get_page [Tracepoint event]
kvmmmu:kvm_mmu_sync_page [Tracepoint event]
kvmmmu:kvm_mmu_unsync_page [Tracepoint event]
kvmmmu:kvm_mmu_prepare_zap_page [Tracepoint event]
kvmmmu:mark_mmio_spte [Tracepoint event]
kvmmmu:handle_mmio_page_fault [Tracepoint event]
kvmmmu:fast_page_fault [Tracepoint event]

This patch replace PARSE_OPT_STOP_AT_NON_OPTION as 0, then we can parse it even if
it is not the first argument.

# ./perf list kvmmmu --raw-dump
kvmmmu:kvm_mmu_pagetable_walk kvmmmu:kvm_mmu_paging_element
kvmmmu:kvm_mmu_set_accessed_bit kvmmmu:kvm_mmu_set_dirty_b
it kvmmmu:kvm_mmu_walker_error kvmmmu:kv

Signed-off-by: Dongsheng Yang <yangds.fnst@xxxxxxxxxxxxxx>
tools/perf/builtin-list.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c
index ec90d0a..9430666 100644
--- a/tools/perf/builtin-list.c
+++ b/tools/perf/builtin-list.c
@@ -30,8 +30,7 @@ int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused)

- argc = parse_options(argc, argv, list_options, list_usage,
+ argc = parse_options(argc, argv, list_options, list_usage, 0);



To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/