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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170418185331.GC15584@krava>
Date:   Tue, 18 Apr 2017 20:53:31 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     Jin Yao <yao.jin@...ux.intel.com>
Cc:     acme@...nel.org, jolsa@...nel.org, peterz@...radead.org,
        mingo@...hat.com, alexander.shishkin@...ux.intel.com,
        Linux-kernel@...r.kernel.org, ak@...ux.intel.com,
        kan.liang@...el.com, yao.jin@...el.com,
        linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH v4 4/5] perf report: Show branch type statistics for
 stdio mode

On Wed, Apr 12, 2017 at 06:21:05AM +0800, Jin Yao wrote:

SNIP

> +const char *branch_type_name(int type)
> +{
> +	const char *branch_names[PERF_BR_MAX] = {
> +		"N/A",
> +		"JCC",
> +		"JMP",
> +		"IND_JMP",
> +		"CALL",
> +		"IND_CALL",
> +		"RET",
> +		"SYSCALL",
> +		"SYSRET",
> +		"IRQ",
> +		"INT",
> +		"IRET",
> +		"FAR_BRANCH",
> +	};
> +
> +	if ((type >= 0) && (type < PERF_BR_MAX))
> +		return branch_names[type];
> +
> +	return NULL;

looks like we should add util/branch.c with above functions
and merge it with util/parse-branch-options.c

we create new file even for less code ;-)

thanks,
jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ