Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify documentation around profiling based on user feedback #23858

Closed
bradcray opened this issue Nov 15, 2023 · 1 comment · Fixed by #23861
Closed

Clarify documentation around profiling based on user feedback #23858

bradcray opened this issue Nov 15, 2023 · 1 comment · Fixed by #23861

Comments

@bradcray
Copy link
Member

bradcray commented Nov 15, 2023

This user interaction in gitter suggests that our profiling documentation isn't particularly up-to-date w.r.t. the LLVM back-end coming online, and checking a few key documents, it looks like other clarifications are possible as well (like that building with PROFILE=1 or similar options only affects the runtime and third-party code, not the Chapel installation as a whole).

@psath
Copy link

psath commented Nov 15, 2023

The settings I was able to get gprof working on both 1.31 and 1.32 were as follows:
Runtime/compiler built with:

CHPL_GPU=cpu
CHPL_LOCALE_MODEL=flat
CHPL_HOST_COMPILER=gnu
CHPL_TARGET_COMPILER=gnu
DEBUG=0
OPTIMIZE=1
PROFILE=1

User code built with:

--fast --ccflags -pg --ldflags -pg

(GPU loops were manually refactored to run on CPU to steer clear of #23859)

bradcray added a commit that referenced this issue Nov 16, 2023
…back-end (#23861)

[reviewed by @jabraham17]

Based on user interactions this week, this refreshes some documentation
w.r.t. profiling and also adds a warning to the compiler if trying to
use the `-pg` flag with the LLVM back-end to indicate that it is not
supported. Specifically it:

* adds a warning to the compiler when the target compiler is LLVM and
ccflags or ldflags contains the string `-pg`
* adds a test for this warning
* adds a caveat to the documentation about profiling generated code
using `gprof` not being supported by the LLVM back-end
* adds an indication that other performance analysis tools may be used
with Chapel without providing instructions
* refreshes the profiling-related text now that this developer-oriented
document is available on the web docs and readily findable by searching.
Specifically, it:
  * fixed grammatical errors (hopefully without introducing new ones)
  * tries to linearize and tighten up the descriptions
* removes a bunch of stuff that feels very advanced developer-oriented
and potentially outdated
* clarifies that settings made at `make` time only affect the compiler,
runtime, and third-parties, not the compiler's behavior
* re-alphabetizes the table of major build options available in the
Makefiles

Resolves #23858
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants