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

Add section Profiling your K semantics section in the user manual. #2809

Merged
merged 5 commits into from
Sep 12, 2022

Conversation

ChristianoBraga
Copy link

The new section, right after Debugging, gives a general description of the process necessary for profiling and illustrates it with a couple of Makefile target examples from the KPlutus project.

Copy link
Contributor

@radumereuta radumereuta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor aesthetic changes.
Suggestions from the makefile blocks removes trailing whitespace so it doesn't introduce a horizontal scroll bar in the rendered version.

I would still like it this gets one more review from @dwightguth or @ehildenb

USER_MANUAL.md Outdated Show resolved Hide resolved
USER_MANUAL.md Outdated Show resolved Hide resolved
USER_MANUAL.md Outdated Show resolved Hide resolved
USER_MANUAL.md Outdated

1. The first thing to be aware of is in order to get meaningful data, you need to build the semantics and all of its dependencies with optimizations enabled but _without the frame pointer elimination optimization_. For example, for EVM, this means rebuilding GMP, MPFR, JEMalloc, Crypto++, SECP256K1, etc with the following `exports`.
```shell
export CFLAGS="-g -O2 -fno-omit-frame-pointer"; export CXXFLAGS="-g -O2 -fno-omit-frame-pointer"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's add -DNDEBUG but remove -g here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dwightguth is this suggested change supposed to be for both CFLAGS and CXXFLAGS? Currently, we are saying -DNDEBUG for CXXFLAGS, but -g for CFLAGS.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both

USER_MANUAL.md Outdated Show resolved Hide resolved
USER_MANUAL.md Outdated Show resolved Hide resolved
USER_MANUAL.md Outdated Show resolved Hide resolved
USER_MANUAL.md Outdated Show resolved Hide resolved
@ehildenb
Copy link
Member

The rest of the file is wrapped at 80 characters I believe @ChristianoBraga . Please follow the same convention.

@dwightguth
Copy link
Collaborator

dwightguth commented Aug 30, 2022

As a matter of fact, because of how terminals that are exactly 80 characters wide tend to work, the entire file is word wrapped such that each line (with the exception of some code fragments and urls that aren't easy to effectively wrap) is less than 80 characters, as in, the 79th character is the last one that is allowed to exist.

USER_MANUAL.md Outdated Show resolved Hide resolved
USER_MANUAL.md Outdated Show resolved Hide resolved
@ChristianoBraga
Copy link
Author

ChristianoBraga commented Sep 4, 2022 via email

@ehildenb ehildenb self-assigned this Sep 8, 2022
USER_MANUAL.md Outdated Show resolved Hide resolved
@rv-jenkins rv-jenkins merged commit b8d9e0d into master Sep 12, 2022
@rv-jenkins rv-jenkins deleted the profiling branch September 12, 2022 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update the USERMANUAL with info about how to do rule profiling in the LLVM backend
5 participants