<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/internal/syscall/windows/syscall_windows.go, branch json-isValidNumber-before</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=json-isValidNumber-before</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=json-isValidNumber-before'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2023-01-24T13:26:00Z</updated>
<entry>
<title>os: use handle based APIs to read directories on windows</title>
<updated>2023-01-24T13:26:00Z</updated>
<author>
<name>qmuntal</name>
<email>quimmuntal@gmail.com</email>
</author>
<published>2022-11-22T17:46:35Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=1951857ec07c1d491e1836770a647d3902934a67'/>
<id>urn:sha1:1951857ec07c1d491e1836770a647d3902934a67</id>
<content type='text'>
This CL updates File.readdir() on windows so it uses
GetFileInformationByHandleEx with FILE_ID_BOTH_DIR_INFO
instead of Find* APIs. The former is more performant because
it allows us to buffer IO calls and reduces the number of system calls,
passing from 1 per file to 1 every ~100 files
(depending on the size of the file name and the size of the buffer).

This change improve performance of File.ReadDir by 20-30%.

name        old time/op    new time/op    delta
ReadDir-12     562µs ±14%     385µs ± 9%  -31.60%  (p=0.000 n=9+9)

name        old alloc/op   new alloc/op   delta
ReadDir-12    29.7kB ± 0%    29.5kB ± 0%   -0.88%  (p=0.000 n=8+10)

name        old allocs/op  new allocs/op  delta
ReadDir-12       399 ± 0%       397 ± 0%   -0.50%  (p=0.000 n=10+10)

This change also speeds up calls to os.SameFile when using FileStats
returned from File.readdir(), as their file ID can be inferred while
reading the directory.

Change-Id: Id56a338ee66c39656b564105cac131099218fb5d
Reviewed-on: https://go-review.googlesource.com/c/go/+/452995
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Alex Brainman &lt;alex.brainman@gmail.com&gt;
Run-TryBot: Quim Muntal &lt;quimmuntal@gmail.com&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
</content>
</entry>
<entry>
<title>internal/syscall/windows: simplify unsafe.Slice usage</title>
<updated>2022-09-09T20:29:05Z</updated>
<author>
<name>Cuong Manh Le</name>
<email>cuong.manhle.vn@gmail.com</email>
</author>
<published>2022-09-09T18:34:35Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=54182ff54a687272dd7632c3a963e036ce03cb7c'/>
<id>urn:sha1:54182ff54a687272dd7632c3a963e036ce03cb7c</id>
<content type='text'>
CL 428780 used unsafe.Slice instead of unsafeheader for simplifiying the
code. However, it can be even simpler, since "p" is already a *uin16,
the unsafe cast is not necessary.

Change-Id: Idc492b73518637997e85c0b33f8591bd19b7929f
Reviewed-on: https://go-review.googlesource.com/c/go/+/429915
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Cuong Manh Le &lt;cuong.manhle.vn@gmail.com&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
Auto-Submit: Cuong Manh Le &lt;cuong.manhle.vn@gmail.com&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
</content>
</entry>
<entry>
<title>internal/syscall/windows: use unsafe.Slice instead of unsafeheader package</title>
<updated>2022-09-09T13:00:05Z</updated>
<author>
<name>Tobias Klauser</name>
<email>tklauser@distanz.ch</email>
</author>
<published>2022-09-07T15:23:03Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=218294f11ee4d988112263e1f2660acf443afdd9'/>
<id>urn:sha1:218294f11ee4d988112263e1f2660acf443afdd9</id>
<content type='text'>
Follow CL 428777.

Change-Id: I5ce49322e92c5d6539bb08248e3366187c30dcd8
Reviewed-on: https://go-review.googlesource.com/c/go/+/428780
Run-TryBot: Tobias Klauser &lt;tobias.klauser@gmail.com&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Auto-Submit: Tobias Klauser &lt;tobias.klauser@gmail.com&gt;
</content>
</entry>
<entry>
<title>runtime/pprof: add memory mapping info for Windows</title>
<updated>2022-08-20T00:18:04Z</updated>
<author>
<name>Egon Elbre</name>
<email>egonelbre@gmail.com</email>
</author>
<published>2022-07-11T08:58:39Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=28afa5b1761ba6bb51a4c831e9ee0b9812de8bc5'/>
<id>urn:sha1:28afa5b1761ba6bb51a4c831e9ee0b9812de8bc5</id>
<content type='text'>
Fixes #43296

Change-Id: Ib277c2e82c95f71a7a9b7fe1b22215ead7a54a88
Reviewed-on: https://go-review.googlesource.com/c/go/+/416975
Run-TryBot: Alex Brainman &lt;alex.brainman@gmail.com&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
Reviewed-by: Alex Brainman &lt;alex.brainman@gmail.com&gt;
Reviewed-by: Than McIntosh &lt;thanm@google.com&gt;
</content>
</entry>
<entry>
<title>cmd/go: add functions to read index file</title>
<updated>2022-06-03T19:59:31Z</updated>
<author>
<name>Michael Matloob</name>
<email>matloob@golang.org</email>
</author>
<published>2022-04-05T22:47:23Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=06261062e9a1875338b04aaea3b6335d73b513a7'/>
<id>urn:sha1:06261062e9a1875338b04aaea3b6335d73b513a7</id>
<content type='text'>
The data read is used for three primary functions: ImportPackage,
IsDirWithGoFiles and ScanDir. Functions are also provided to get this
information from the intermediate package representation to cache
the information from reads for non-indexed packages.

Change-Id: I5eed629bb0d6ee5b88ab706d06b074475004c081
Reviewed-on: https://go-review.googlesource.com/c/go/+/403975
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Michael Matloob &lt;matloob@golang.org&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
</content>
</entry>
<entry>
<title>Revert "os: add handling of os.Interrupt for windows"</title>
<updated>2022-04-04T15:12:26Z</updated>
<author>
<name>Bryan Mills</name>
<email>bcmills@google.com</email>
</author>
<published>2022-04-04T14:45:45Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=f86f9a3038eb6db513a0ea36bc2af7a13b005e99'/>
<id>urn:sha1:f86f9a3038eb6db513a0ea36bc2af7a13b005e99</id>
<content type='text'>
This reverts CL 367495.

Reason for revert: broke `x/tools` tests on Windows.

Change-Id: Iab6b33259181c9520cf8db1e5b6edfeba763f974
Reviewed-on: https://go-review.googlesource.com/c/go/+/397997
Trust: Bryan Mills &lt;bcmills@google.com&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
</content>
</entry>
<entry>
<title>os: add handling of os.Interrupt for windows</title>
<updated>2022-04-03T21:26:39Z</updated>
<author>
<name>Constantin Konstantinidis</name>
<email>constantinkonstantinidis@gmail.com</email>
</author>
<published>2021-11-28T14:19:15Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=345184496ce358e663b0150f679d5e5cf1337b41'/>
<id>urn:sha1:345184496ce358e663b0150f679d5e5cf1337b41</id>
<content type='text'>
Add GenerateConsoleCtrlEvent call to internal syscall package.
Define ErrProcessDone while reviewing handling of os.Signal().
Update test to run for windows using the added call.

Fixes #42311
Fixes #46354

Change-Id: I460955efc76c4febe04b612ac9a0670e62ba5ff3
Reviewed-on: https://go-review.googlesource.com/c/go/+/367495
Trust: Patrik Nyblom &lt;pnyb@google.com&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
</entry>
<entry>
<title>syscall: remove RtlGenRandom and move it into internal/syscall</title>
<updated>2021-01-15T18:42:27Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2021-01-14T23:04:10Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=bb5075a5259baeaa75f09db64c3860c5876a00fd'/>
<id>urn:sha1:bb5075a5259baeaa75f09db64c3860c5876a00fd</id>
<content type='text'>
There's on need to expose this to the frozen syscall package, and it
also doesn't need to be unsafe. So we move it into internal/syscall and
have the generator make a safer function signature.

Fixes #43704.

Change-Id: Iccae69dc273a0aa97ee6846eb537f1dc1412f2de
Reviewed-on: https://go-review.googlesource.com/c/go/+/283992
Run-TryBot: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Austin Clements &lt;austin@google.com&gt;
Trust: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>os: implement File.Chmod on Windows</title>
<updated>2020-09-11T22:10:02Z</updated>
<author>
<name>Constantin Konstantinidis</name>
<email>constantinkonstantinidis@gmail.com</email>
</author>
<published>2020-08-16T11:48:09Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=d7384f36121d52191097af50d6dc12c0eb08fd75'/>
<id>urn:sha1:d7384f36121d52191097af50d6dc12c0eb08fd75</id>
<content type='text'>
Fixes: #39606

Change-Id: I4def67ef18bd3ff866b140f6e76cdabe5d51a1c5
Reviewed-on: https://go-review.googlesource.com/c/go/+/250077
Run-TryBot: Alex Brainman &lt;alex.brainman@gmail.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Alex Brainman &lt;alex.brainman@gmail.com&gt;
</content>
</entry>
<entry>
<title>syscall, internal/syscall/windows: remove utf16PtrToString parameter</title>
<updated>2020-05-03T07:23:32Z</updated>
<author>
<name>Alex Brainman</name>
<email>alex.brainman@gmail.com</email>
</author>
<published>2020-04-19T07:08:58Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=53f27474a455a4a82e8c0f8ef4cee9a37b51ff98'/>
<id>urn:sha1:53f27474a455a4a82e8c0f8ef4cee9a37b51ff98</id>
<content type='text'>
CL 208617 introduced syscall.utf16PtrToString and
internal/syscall/windows.UTF16PtrToString functions.

Original version of CL 208617 did not include syscall.utf16PtrToString
and internal/syscall/windows.UTF16PtrToString max parameter. The
parameter was added by Brad at the request of Ian. Ian said:

"In some cases it seems at least possible that the null terminator is
not present. I think it would be safer if we passed a maximum length
here."

The syscall.utf16PtrToString and
internal/syscall/windows.UTF16PtrToString function are designed to work
with only null terminated strings. So max parameter is superfluous.

This change removes max parameter.

Updates #34972

Change-Id: Ifea65dbd86bca8a08353579c6b9636c6f963d165
Reviewed-on: https://go-review.googlesource.com/c/go/+/228858
Run-TryBot: Alex Brainman &lt;alex.brainman@gmail.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Bryan C. Mills &lt;bcmills@google.com&gt;
</content>
</entry>
</feed>
