Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Apr 2012 23:47:23 +0400
From:      Andrey Zonov <andrey@zonov.org>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r233925 - in head: sys/kern sys/sys sys/vm usr.bin/kdump usr.bin/ktrace
Message-ID:  <4F848E4B.8020302@zonov.org>
In-Reply-To: <201204051713.q35HDE3d067735@svn.freebsd.org>
References:  <201204051713.q35HDE3d067735@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------080007010705000102020006
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

On 05.04.2012 21:13, John Baldwin wrote:
> Author: jhb
> Date: Thu Apr  5 17:13:14 2012
> New Revision: 233925
> URL: http://svn.freebsd.org/changeset/base/233925
>
> Log:
>    Add new ktrace records for the start and end of VM faults.  This gives
>    a pair of records similar to syscall entry and return that a user can
>    use to determine how long page faults take.  The new ktrace records are
>    enabled via the 'p' trace type, and are enabled in the default set of
>    trace points.
>
>    Reviewed by:	kib
>    MFC after:	2 weeks
>

Hi John,

Thanks a lot, this change is very useful!

And while you are here I would like to show you a patch which adds a 
"wmesg" to the context switch tracing.  It is not finished, it's just a 
concept.  Please review it and if you are interesting in that I'll 
finish it and will test more widely.

-- 
Andrey Zonov

--------------080007010705000102020006
Content-Type: text/plain; charset=windows-1251;
 name="ktrace_csw.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="ktrace_csw.patch"

SW5kZXg6IHVzci5iaW4va2R1bXAva2R1bXAuYwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSB1c3IuYmlu
L2tkdW1wL2tkdW1wLmMJKHJldmlzaW9uIDIzMzkyNSkKKysrIHVzci5iaW4va2R1bXAva2R1
bXAuYwkod29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mNzdygxLCAwLCB3bWVzZyk7CiAJCXNsZWVwcV9sb2NrKGlkZW50KTsKIAl9
CiAjZW5kaWYKQEAgLTMxNiw3ICszMTYsNyBAQCBtc2xlZXBfc3Bpbih2b2lkICppZGVudCwg
c3RydWN0IG10eCAqbXR4LCBjb25zdCBjaAogCX0KICNpZmRlZiBLVFJBQ0UKIAlpZiAoS1RS
UE9JTlQodGQsIEtUUl9DU1cpKQotCQlrdHJjc3coMCwgMCk7CisJCWt0cmNzdygwLCAwLCB3
bWVzZyk7CiAjZW5kaWYKIAlQSUNLVVBfR0lBTlQoKTsKIAltdHhfbG9ja19zcGluKG10eCk7
Cg==
--------------080007010705000102020006--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F848E4B.8020302>