From nobody Sun Aug  6 17:59:10 2023
X-Original-To: arch@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RJnJb2rM7z4mB3V
	for <arch@mlmmj.nyi.freebsd.org>; Sun,  6 Aug 2023 17:59:11 +0000 (UTC)
	(envelope-from bugzilla-noreply@freebsd.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (4096 bits) client-digest SHA256)
	(Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4RJnJb1dgBz4Kdd
	for <arch@FreeBSD.org>; Sun,  6 Aug 2023 17:59:11 +0000 (UTC)
	(envelope-from bugzilla-noreply@freebsd.org)
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1691344751;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=WOHOe3JI2yggHUsmnVIjuyvvy63d23njowvJ8v7pTdQ=;
	b=hijgFZ1Hk02fglOIR3ZnMecKuYTg9e8oftX+71v3owLeF5gWrzNm/OqgSC/J52lqZlLPqF
	9chAaNKekeXROrNNX+ufwOun0ZXp7iOesVNrYYYyKVAFW/HXocw11+sV3N0t26aptkerkU
	zSLRNQ0jGfdfP7vv9T88qztRMuJzCWh3za5PJluIQSMwPUKjey6WI40zZwsIhCvK8s4YXI
	2nOUsUD9hyGUDEsTpLKr9ren0moJfvYFZAF/3eyeuo8kINMnKbqvY8VngR0kxhD2n67HJQ
	3DeixHVt9x9BGs/pZk8fm+oBqexy7nFED3tdWY0tyUQakdNE5452p3cX+dmjVg==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691344751; a=rsa-sha256; cv=none;
	b=iiiX9K6geYHdVHBQhF81r2zf2PCciwP09ddl3+4YpBRznjBXEPpbJnfwTi+pXS6Lvk5MbT
	A4y8ZLt0IVME13RGCmOYbssqpf5mdn1ICmbndOZ4UT+BHbNHrhOTXygKrn5ZM3dcP5BHRf
	NeoFQsJe8yBMZ+lyZ+f7wdFdKN0fN9KP4n6FAwlNCtOz/JvTicU9+i2usHPY4umn1HHgAM
	vZcSitB5puF3L7IiYY16FaRvP6t+ws56xKqEg1vch1XtP9CxN4Az3n2injfTAR3uGI8Lq3
	3+udHweBv3a6lnrLRBh0OZ89dn83Qa2NgZjETJG6Vva86SgCovuigqwKc77CVQ==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RJnJb0clzz553
	for <arch@FreeBSD.org>; Sun,  6 Aug 2023 17:59:11 +0000 (UTC)
	(envelope-from bugzilla-noreply@freebsd.org)
Received: from kenobi.freebsd.org ([127.0.1.5])
	by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 376HxBif019061
	for <arch@FreeBSD.org>; Sun, 6 Aug 2023 17:59:11 GMT
	(envelope-from bugzilla-noreply@freebsd.org)
Received: (from www@localhost)
	by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 376HxBaT019060
	for arch@FreeBSD.org; Sun, 6 Aug 2023 17:59:11 GMT
	(envelope-from bugzilla-noreply@freebsd.org)
X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f
From: bugzilla-noreply@freebsd.org
To: arch@FreeBSD.org
Subject: [Bug 270481] intro(9) needs an update/rewrite
Date: Sun, 06 Aug 2023 17:59:10 +0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: Documentation
X-Bugzilla-Component: Manual Pages
X-Bugzilla-Version: Latest
X-Bugzilla-Keywords: 
X-Bugzilla-Severity: Affects Only Me
X-Bugzilla-Who: grahamperrin@gmail.com
X-Bugzilla-Status: In Progress
X-Bugzilla-Resolution: 
X-Bugzilla-Priority: ---
X-Bugzilla-Assigned-To: mhorne@freebsd.org
X-Bugzilla-Flags: 
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-270481-24229-VxRiWYpki7@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-270481-24229@https.bugs.freebsd.org/bugzilla/>
References: <bug-270481-24229@https.bugs.freebsd.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/
Auto-Submitted: auto-generated
List-Id: Discussion related to FreeBSD architecture <freebsd-arch.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/freebsd-arch
List-Help: <mailto:freebsd-arch+help@freebsd.org>
List-Post: <mailto:freebsd-arch@freebsd.org>
List-Subscribe: <mailto:freebsd-arch+subscribe@freebsd.org>
List-Unsubscribe: <mailto:freebsd-arch+unsubscribe@freebsd.org>
Sender: owner-freebsd-arch@freebsd.org
MIME-Version: 1.0

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D270481

Graham Perrin =E2=97=90 <grahamperrin@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |grahamperrin@gmail.com

--- Comment #4 from Graham Perrin =E2=97=90 <grahamperrin@gmail.com> ---
A great improvement, thanks.=20

<https://github.com/freebsd/freebsd-src/pull/813> includes one correction, =
and
suggests a few other minor changes.

--=20
You are receiving this mail because:
You are on the CC list for the bug.=

From nobody Tue Aug  8 14:12:52 2023
X-Original-To: arch@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RKwCR62Wdz4mPcX
	for <arch@mlmmj.nyi.freebsd.org>; Tue,  8 Aug 2023 14:13:39 +0000 (UTC)
	(envelope-from br@bsdpad.com)
Received: from mail.bsdpad.com (mail.bsdpad.com [116.202.106.248])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(Client did not present a certificate)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4RKwCQ16QDz3QcZ
	for <arch@freebsd.org>; Tue,  8 Aug 2023 14:13:38 +0000 (UTC)
	(envelope-from br@bsdpad.com)
Authentication-Results: mx1.freebsd.org;
	dkim=pass header.d=bsdpad.com header.s=20201212 header.b=tcCjlmmy;
	spf=pass (mx1.freebsd.org: domain of br@bsdpad.com designates 116.202.106.248 as permitted sender) smtp.mailfrom=br@bsdpad.com;
	dmarc=pass (policy=none) header.from=bsdpad.com
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=bsdpad.com;
	s=20201212; h=Subject:To:From;
	bh=OFXpnogA2bVmdWiWgZGYVsMHWjEanqdsDAkWdWbFGxY=; b=tcCjlmmyaLil7vmWZeeLr+94cp
	HbXJ7QK7rVtmvVE4rYLc7x7ZivBBUXOOfVx75WK1lMyQG2b/fG0yUFgX/wzE4B/mRFwjKw8sJclZA
	dYp+y3mTeXCHd/0JMrewCTBXlXayATH1Dt75hO7ciFQ+Z9m/UVoQo44+ifdnfvts8sGLUrsZF4dyZ
	vPYGs41iJgVlmRyO74CcMlPOvwIju1TFPmVOjV0n2dOW5Hve86j/f8qoFbvAbZ129pg7ELWKq5T9S
	otFEOXmqUki2z9bRpEVxiBhS++rkWnZVDyCITTC9VnSmZxiXKu4rn+QhUNMHGGQ6aVCP9dj5WmSWW
	bTaAvIdA==;
Received: from localhost ([127.0.0.1] helo=bsdpad.com)
	by mail.bsdpad.com with smtp (Exim 4.94 (FreeBSD))
	(envelope-from <br@bsdpad.com>)
	id 1qTNS8-00067M-2d
	for arch@freebsd.org; Tue, 08 Aug 2023 15:12:52 +0100
Received: by bsdpad.com (nbSMTP-1.00) for uid 1001
	br@bsdpad.com; Tue,  8 Aug 2023 15:12:52 +0100 (BST)
Date: Tue, 8 Aug 2023 15:12:52 +0100
From: Ruslan Bukin <br@bsdpad.com>
To: arch@freebsd.org
Subject: D40466: HW-assisted tracing
Message-ID: <ZNJNZKR21B9Yv3Qm@bsdpad.com>
List-Id: Discussion related to FreeBSD architecture <freebsd-arch.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/freebsd-arch
List-Help: <mailto:freebsd-arch+help@freebsd.org>
List-Post: <mailto:freebsd-arch@freebsd.org>
List-Subscribe: <mailto:freebsd-arch+subscribe@freebsd.org>
List-Unsubscribe: <mailto:freebsd-arch+unsubscribe@freebsd.org>
Sender: owner-freebsd-arch@freebsd.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
X-Spamd-Result: default: False [-3.97 / 15.00];
	NEURAL_HAM_MEDIUM(-1.00)[-1.000];
	NEURAL_HAM_LONG(-1.00)[-1.000];
	NEURAL_HAM_SHORT(-0.97)[-0.972];
	DMARC_POLICY_ALLOW(-0.50)[bsdpad.com,none];
	R_SPF_ALLOW(-0.20)[+mx];
	R_DKIM_ALLOW(-0.20)[bsdpad.com:s=20201212];
	MIME_GOOD(-0.10)[text/plain];
	MLMMJ_DEST(0.00)[arch@freebsd.org];
	MIME_TRACE(0.00)[0:+];
	FROM_EQ_ENVFROM(0.00)[];
	ASN(0.00)[asn:24940, ipnet:116.202.0.0/16, country:DE];
	RCVD_TLS_LAST(0.00)[];
	ARC_NA(0.00)[];
	RCPT_COUNT_ONE(0.00)[1];
	RCVD_COUNT_TWO(0.00)[2];
	FREEFALL_USER(0.00)[br];
	DKIM_TRACE(0.00)[bsdpad.com:+];
	FROM_HAS_DN(0.00)[];
	TO_DN_NONE(0.00)[];
	TO_MATCH_ENVRCPT_ALL(0.00)[];
	MID_RHS_MATCH_FROM(0.00)[]
X-Spamd-Bar: ---
X-Rspamd-Queue-Id: 4RKwCQ16QDz3QcZ

Hello,

I have been working on the new tracing framework to provide instrumentation needed for technologies like ARM Coresight, ARM Statistical Profiling Extension (SPE), Intel Processor Trace (PT).

My previous attempt on adding that functionality into hwpmc(4) fail so I decided to try again.

So the new framework manages hardware technology that collects information about software execution and records it as "events" in highly compressed format into DRAM. The events cover information about control flow changes of a program, whether branches taken or not, exceptions taken, timing information, cycles elapsed and more. That allow us to restore entire program flow of a given application without performance impact.

With this we can get the call trace and (with some effort of tracing analysis) understand how many times functions are called, how much time we spent in a single function, how we been interrupted and what we were doing inside the functions.
We can trace individual threads of an executable in userspace or whatever CPU activity (of a specified IP range) in kernel mode, regardless of a thread.

Currently targeting ARM Coresight support. Hovewer, my colleague in ARM Ltd is working on adding SPE support to it.
I have some snippets for Intel PT as well, if someone is interested on adding PT support then let me know and I can help.

https://reviews.freebsd.org/D40466

Ruslan