[all-commits] [llvm/llvm-project] 7ec682: [MC] Use StringRefs from pseudo_probe_desc section...

Amir Ayupov via All-commits all-commits at lists.llvm.org
Fri Nov 8 16:39:54 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7ec682b16b49c754d5b4aa6347f8f5a00bd7dd78
      https://github.com/llvm/llvm-project/commit/7ec682b16b49c754d5b4aa6347f8f5a00bd7dd78
  Author: Amir Ayupov <aaupov at fb.com>
  Date:   2024-11-08 (Fri, 08 Nov 2024)

  Changed paths:
    M bolt/lib/Rewrite/PseudoProbeRewriter.cpp
    M llvm/include/llvm/MC/MCPseudoProbe.h
    M llvm/lib/MC/MCPseudoProbe.cpp

  Log Message:
  -----------
  [MC] Use StringRefs from pseudo_probe_desc section if it's mapped

Add `IsMMapped` flag to `buildGUID2FuncDescMap` controlling whether to
allocate a string in `FuncNameAllocator` or use StringRef directly.
Keep it false by default, only set it for BOLT use case because BOLT
keeps file sections in memory while processing them. llvm-profgen
constructs GUID2FuncDescMap and then releases the binary.

For medium sized binary with 0.8 GiB .pseudo_probe_desc section, this
saves 0.7 GiB peak RSS in perf2bolt.

Test Plan: no-op for llvm-profgen, NFC for perf2bolt

Reviewers: maksfb, dcci, wlei-llvm, rafaelauler, ayermolo

Reviewed By: wlei-llvm

Pull Request: https://github.com/llvm/llvm-project/pull/112996



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list