Hi,
The call graphs generated by “llvm-xray graph” has function names, while the “llvm-xray graph-diff” doesn’t shows function names.
This is the command I am using
llvm-xray graph-diff xray-log.clang.1 xray-log.clang.2 -instr-map=…/xray-build/bin/clang -o diff.dot
Attached is the portion of the generated diff graph. Am I missing any flag?
Hi Dangeti,
That's interesting -- can you try providing both `-instr-map-1=` and
`-instr-map-2=` even though they're the same binary?
If that doesn't work then it sounds like a bug.
Cheers
Hi Dean,
I have tried with -instr-map-1 and -instr-map-2, it didn’t work.
Is there a way to find the function name from the identifier?
-DTharun
Hi Dean,
I have tried with -instr-map-1 and -instr-map-2, it didn't work.
Yeah, I'm looking through the code and it looks like we're always just
using the function id when we should be using the symbol name. Let me
land a patch to fix this.
Is there a way to find the function name from the identifier?
You can try this manually by using the `llvm-xray extract -symbolize`
tool to get a YAML file that maps the function id's to symbols, but
that's a roundabout way of doing it. Ideally the graph-diff tool
should just do it.
Cheers
Hi Dean,
I have tried with -instr-map-1 and -instr-map-2, it didn’t work.
Yeah, I’m looking through the code and it looks like we’re always just
using the function id when we should be using the symbol name. Let me
land a patch to fix this.
Thanks Dean.
Is there a way to find the function name from the identifier?
You can try this manually by using the llvm-xray extract -symbolize
tool to get a YAML file that maps the function id’s to symbols, but
that’s a roundabout way of doing it. Ideally the graph-diff tool
should just do it.
I have tried this strangely I got this error
$> llvm-xray extract -symbolize xray-log.clang-8.*
YAML:1:1: error: Got empty plain scalar
llvm-xray: Cannot extract instrumentation map from ‘xray-log.clang-8.*’
Failed loading YAML document from 'xray-log.clang-8.*
but this is working
llvm-xray convert xray-log.clang-8.* -instr_map=…/avx/llvm/xray-build/bin/clang -output-format=yaml 1>out.yaml
Am I missing anything?
>
> Hi Dean,
>
> I have tried with -instr-map-1 and -instr-map-2, it didn't work.
>
Yeah, I'm looking through the code and it looks like we're always just
using the function id when we should be using the symbol name. Let me
land a patch to fix this.
Thanks Dean.
> Is there a way to find the function name from the identifier?
You can try this manually by using the `llvm-xray extract -symbolize`
tool to get a YAML file that maps the function id's to symbols, but
that's a roundabout way of doing it. Ideally the graph-diff tool
should just do it.
I have tried this strangely I got this error
$> llvm-xray extract -symbolize xray-log.clang-8.*
YAML:1:1: error: Got empty plain scalar
llvm-xray: Cannot extract instrumentation map from 'xray-log.clang-8.*'
Failed loading YAML document from 'xray-log.clang-8.*
Sorry, that was unclear -- you can extract the instrumentation map
from an XRay-instrumented binary, not the traces.
but this is working
llvm-xray convert xray-log.clang-8.* -instr_map=../avx/llvm/xray-build/bin/clang -output-format=yaml 1>out.yaml
Am I missing anything?
Nope, my instructions were unclear. 
I've uploaded a patch which should make this work -- if you're able to
build the tool(s) with the patch applied, then it would be great to
hear your feedback:
https://reviews.llvm.org/D56383
I'm going to need to come up with test-cases locally to ensure that
this doesn't regress (and that it works as expected) but it would have
to wait 'til tomorrow.
Cheers
Hi Dean,
I have tried with -instr-map-1 and -instr-map-2, it didn’t work.
Yeah, I’m looking through the code and it looks like we’re always just
using the function id when we should be using the symbol name. Let me
land a patch to fix this.
Thanks Dean.
Is there a way to find the function name from the identifier?
You can try this manually by using the llvm-xray extract -symbolize
tool to get a YAML file that maps the function id’s to symbols, but
that’s a roundabout way of doing it. Ideally the graph-diff tool
should just do it.
I have tried this strangely I got this error
$> llvm-xray extract -symbolize xray-log.clang-8.*
YAML:1:1: error: Got empty plain scalar
llvm-xray: Cannot extract instrumentation map from 'xray-log.clang-8.’
Failed loading YAML document from 'xray-log.clang-8.
Sorry, that was unclear – you can extract the instrumentation map
from an XRay-instrumented binary, not the traces.
but this is working
llvm-xray convert xray-log.clang-8.* -instr_map=…/avx/llvm/xray-build/bin/clang -output-format=yaml 1>out.yaml
Am I missing anything?
Nope, my instructions were unclear. 
I’ve uploaded a patch which should make this work – if you’re able to
build the tool(s) with the patch applied, then it would be great to
hear your feedback:
https://reviews.llvm.org/D56383
Thanks for your prompt response. I have applied the patch. Unfortunately, it did not solve the problem, I am still seeing function ids.