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]
Date:	Sat, 29 Aug 2015 12:47:49 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Kan Liang <kan.liang@...el.com>
Cc:	acme@...nel.org, jolsa@...nel.org, ak@...ux.intel.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2 2/2] perf,test: test cpu topology

On Fri, Aug 28, 2015 at 09:43:39AM -0400, Kan Liang wrote:

SNIP

> +	TEST_ASSERT_VAL("failed to get system cpumap", !(map == NULL));
> +
> +	file.mode = PERF_DATA_MODE_READ;
> +	session = perf_session__new(&file, false, NULL);
> +	TEST_ASSERT_VAL("can't get session", session);
> +
> +	for (i = 0; i < session->header.env.nr_cpus_online; i++) {
> +		pr_debug("CPU %d, core %d, socket %d\n", i,
> +			 session->header.env.cpu[i].core_id,
> +			 session->header.env.cpu[i].socket_id);
> +	}
> +
> +	for (i = 0; i < map->nr; i++) {
> +		TEST_ASSERT_VAL("Core ID doesn't match",
> +			(session->header.env.cpu[map->map[i]].core_id == (cpu_map__get_core(map, i) & 0xffff)));
> +
> +		TEST_ASSERT_VAL("Socket ID doesn't match",
> +			(session->header.env.cpu[map->map[i]].socket_id == cpu_map__get_socket(map, i)));
> +	}
> +
> +	perf_session__delete(session);
> +	cpu_map__put(map);

	unlink(path);

> +
> +	return 0;
> +}
> -- 
> 1.8.3.1
> 
--
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