Skip to content

Commit

Permalink
Minor changes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
stedolan committed Jan 20, 2021
1 parent 1d1ed65 commit fc7b0b8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ Working version
including the search path for shared stub libraries.
(David Allsopp, review by Xavier Leroy)

- #9934: Optimise sweeping using prefetching.
(Stephen Dolan and Will Hasenplaugh, review by David Allsopp, Xavier
Leroy and Damien Doligez, benchmarking by Shubham Kumar and KC
Sivaramakrishnan)

- #10025: Track custom blocks (e.g. Bigarray) with Statmemprof
(Stephen Dolan, review by Leo White, Gabriel Scherer and Jacques-Henri
Jourdan)
Expand Down
1 change: 1 addition & 0 deletions runtime/caml/misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ CAMLdeprecated_typedef(addr, char *);
#ifdef CAML_INTERNALS
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
#define caml_prefetch(p) __builtin_prefetch((p), 1, 3)
/* 1 = intent to write; 3 = all cache levels */
#else
#define caml_prefetch(p)
#endif
Expand Down
2 changes: 1 addition & 1 deletion runtime/major_gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ static void sweep_slice (intnat work)
limit = sweep_chunk + Chunk_size(sweep_chunk);
while (work > 0){
if (sweep_hp < limit){
caml_prefetch(sweep_hp + 4096);
caml_prefetch(sweep_hp + 4000);
hp = sweep_hp;
hd = Hd_hp (hp);
work -= Whsize_hd (hd);
Expand Down

0 comments on commit fc7b0b8

Please sign in to comment.