lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1385132788.1747.70.camel@leonhard>
Date:	Sat, 23 Nov 2013 00:06:28 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Jiri Olsa <jolsa@...hat.com>
Cc:	linux-kernel@...r.kernel.org,
	Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...e.hu>, Paul Mackerras <paulus@...ba.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	David Ahern <dsahern@...il.com>,
	Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
Subject: Re: [PATCH 11/22] tools lib traceevent: Add xen plugin

2013-11-21 (목), 12:01 +0100, Jiri Olsa:
> Adding xen plugin.
> 
> This plugin adds fields resolving for
> following tracepoint events:
>   xen:xen_mc_entry
>   xen:xen_mc_extend_args
> 
> The diff of 'perf script' output generated by old and new code:
> (data was generated by 'perf record -e 'xen:*' ls')
> 
> --- script.xen.old
> +++ script.xen.new
> -         swapper     0 [002]   136.267492: xen:xen_mc_entry: [FAILED TO PARSE] op=3 nargs=2 args=ARRAY[18, 00, 00, 00, 00, 00, 00, 00, 00, e0, d4, 4b, 04, 88, ff, ff, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00]
> +         swapper     0 [002]   136.267492: xen:xen_mc_entry: op 3(stack_switch) args [18, 0, 0, 0, 0, 0]
> -            perf  1970 [008]   136.273319: xen:xen_mc_extend_args: [FAILED TO PARSE] op=1 args=16 res=1
> +            perf  1970 [008]   136.273319: xen:xen_mc_extend_args: extending op 1(mmu_update) by 16 bytes res ???
> 
> NOTE We still do not handle the 'sizeof' and fail
> to parse following xen tracepoints:
>   xen:xen_mmu_set_pte
>   xen:xen_mmu_set_pte_atomic
>   xen:xen_mmu_set_domain_pte
>   xen:xen_mmu_set_pte_at
>   xen:xen_mmu_set_pmd
>   xen:xen_mmu_set_pud
>   xen:xen_mmu_set_pgd
>   xen:xen_mmu_ptep_modify_prot_start
>   xen:xen_mmu_ptep_modify_prot_commit
> 

[SNIP]
> +static const char *xen_hypercall_name(unsigned op)
> +{
> +	if (op < ARRAY_SIZE(xen_hypercall_names) &&
> +	    xen_hypercall_names[op] != NULL)
> +		return xen_hypercall_names[op];
> +
> +	return "";

How about defaults to "unknown" if not found?

Thanks
Namhyung


> +}
> +
> +unsigned long long process_xen_hypercall_name(struct trace_seq *s,
> +					      unsigned long long *args)
> +{
> +	unsigned int op = args[0];
> +
> +	trace_seq_printf(s, "%s", xen_hypercall_name(op));
> +	return 0;
> +}
> +
> +int PEVENT_PLUGIN_LOADER(struct pevent *pevent)
> +{
> +	pevent_register_print_function(pevent,
> +				       process_xen_hypercall_name,
> +				       PEVENT_FUNC_ARG_STRING,
> +				       "xen_hypercall_name",
> +				       PEVENT_FUNC_ARG_INT,
> +				       PEVENT_FUNC_ARG_VOID);
> +	return 0;
> +}



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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ