-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[ctx_prof] Handle case when no root is in this Module. #107463
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| ; REQUIRES: x86_64-linux | ||
| ; | ||
| ; Check that, if none of the roots in the profile are defined in the module, the | ||
| ; profile is treated as empty (i.e. "none provided") | ||
| ; | ||
| ; RUN: rm -rf %t | ||
| ; RUN: split-file %s %t | ||
| ; RUN: llvm-ctxprof-util fromJSON --input=%t/profile.json --output=%t/profile.ctxprofdata | ||
| ; RUN: opt -passes='require<ctx-prof-analysis>,print<ctx-prof-analysis>' -ctx-profile-printer-level=everything \ | ||
| ; RUN: %t/example.ll -S 2>&1 | FileCheck %s | ||
|
|
||
| ; CHECK: No contextual profile was provided | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should the error be a bit more explicit - e.g. "No contextual profile containing functions from this module was provided" or something like that?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's not an error, this is the printout from the ctx-profile-printer. |
||
| ; | ||
| ; This is the reference profile, laid out in the format the json formatter will | ||
| ; output it from opt. | ||
| ;--- profile.json | ||
| [ | ||
| { | ||
| "Counters": [ | ||
| 9 | ||
| ], | ||
| "Guid": 12341 | ||
mtrofin marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }, | ||
| { | ||
| "Counters": [ | ||
| 5 | ||
| ], | ||
| "Guid": 12074870348631550642 | ||
| }, | ||
| { | ||
| "Callsites": [ | ||
| [ | ||
| { | ||
| "Counters": [ | ||
| 6, | ||
| 7 | ||
| ], | ||
| "Guid": 728453322856651412 | ||
| } | ||
| ] | ||
| ], | ||
| "Counters": [ | ||
| 1 | ||
| ], | ||
| "Guid": 11872291593386833696 | ||
| } | ||
| ] | ||
| ;--- example.ll | ||
| declare void @bar() | ||
|
|
||
| define void @an_entrypoint(i32 %a) !guid !0 { | ||
| %t = icmp eq i32 %a, 0 | ||
| br i1 %t, label %yes, label %no | ||
|
|
||
| yes: | ||
| call void @bar() | ||
| ret void | ||
| no: | ||
| ret void | ||
| } | ||
|
|
||
| attributes #0 = { noinline } | ||
| !0 = !{ i64 1000 } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isn't attached to anything?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it is now - the goal is to make sure it's clearly different from the given root. |
||
Uh oh!
There was an error while loading. Please reload this page.