[all-commits] [llvm/llvm-project] 13a517: [profile] Delete stale profile in test/profile/ins...

Vedant Kumar via All-commits all-commits at lists.llvm.org
Wed Dec 11 10:17:09 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 13a517445f79a3b30d7457597afdd4cf753dd0e2
      https://github.com/llvm/llvm-project/commit/13a517445f79a3b30d7457597afdd4cf753dd0e2
  Author: Vedant Kumar <vsk at apple.com>
  Date:   2019-12-11 (Wed, 11 Dec 2019)

  Changed paths:
    M compiler-rt/test/profile/instrprof-set-filename.c

  Log Message:
  -----------
  [profile] Delete stale profile in test/profile/instrprof-set-filename.c, NFC


  Commit: d25437e957549bdab46f1a052bad4f330d31a9e1
      https://github.com/llvm/llvm-project/commit/d25437e957549bdab46f1a052bad4f330d31a9e1
  Author: Vedant Kumar <vsk at apple.com>
  Date:   2019-12-11 (Wed, 11 Dec 2019)

  Changed paths:
    M compiler-rt/test/profile/instrprof-value-prof.test

  Log Message:
  -----------
  [profile] Delete stale profiles in test/profile/instrprof-value-prof.test, NFC


  Commit: 5a486e0f156ce62b445ccf7b3ea15dd45394ea1c
      https://github.com/llvm/llvm-project/commit/5a486e0f156ce62b445ccf7b3ea15dd45394ea1c
  Author: Vedant Kumar <vsk at apple.com>
  Date:   2019-12-11 (Wed, 11 Dec 2019)

  Changed paths:
    M compiler-rt/lib/profile/InstrProfilingFile.c
    M compiler-rt/lib/profile/InstrProfilingInternal.h
    M compiler-rt/lib/profile/InstrProfilingPlatformFuchsia.c
    M compiler-rt/lib/profile/InstrProfilingWriter.c

  Log Message:
  -----------
  [profile] Avoid allocating a page on the stack, NFC

When writing out a profile, avoid allocating a page on the stack for the
purpose of writing out zeroes, as some embedded environments do not have
enough stack space to accomodate this.

Instead, use a small, fixed-size zero buffer that can be written
repeatedly.

For a synthetic file with >100,000 functions, I did not measure a
significant difference in profile write times. We are removing a
page-length zero-fill `memset()` in favor of several smaller buffered
`fwrite()` calls: in practice, I am not sure there is much of a
difference. The performance impact is only expected to affect the
continuous sync mode (%c) -- zero padding is less than 8 bytes in all
other cases.

rdar://57810014

Differential Revision: https://reviews.llvm.org/D71323


Compare: https://github.com/llvm/llvm-project/compare/f2f774997357...5a486e0f156c


More information about the All-commits mailing list