-
Notifications
You must be signed in to change notification settings - Fork 357
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 dotnet-extractor tool #2145
Conversation
Hi @JongHeonChoi, I can't actually open the referenced issue dotnet/runtime#44013, it keeps showing as a unicorn for me no matter how many times I try. Have you discussed the architecture with anyone on the diagnostics team? I personally don't think this makes much sense as a standalone tool, it would make more sense as a mode on an existing tool (such as dotnet-stack). |
Thanks for the PR @JongHeonChoi! I haven't had an opportunity to dive in just yet but I can probably get to it tomorrow. @davmason - I too am seeing the unicorn page and I saw it previously too. I hoped it would be transient but it has persisted so I opened a GitHub support ticket for it. I did some review on the PR before the page stopped working.
I discussed it a bit in that other issue. It seemed reasonable to me as a standalone tool to me though I'd be glad to learn more of your thoughts. There is some prior art for us making tools that symbolicate stack traces such as the scenario shown here using StackParser: https://stackoverflow.com/questions/34019714/steps-to-diagnose-translated-uwp-stack-trace |
@davmason - try using this PR link for 44013 instead that the support team offered, it solved the unicorn issue for me:
|
I agree with David. This feels like a good candidate for functionality on |
Thank you for comment. The main requirement of this PR is to provide easy debugging with only the exception log when an exception occurs.
In generally, CE products(mobile, wearable, TV, refrigerator, etc) do not have enough memory.
Anyway, What do you think about moving the functionality to the new |
I took a look and here are first thoughts:
|
We've been pretty picky about what verbs we add to the tools so that we retain some level of uniformity across all of them. In this case, I think you're right, though. At first, I thought it made sense to put it under the report verb, but if we ever decide to move symbolication out of the trace, e.g., we don't do rundown during an eventpipe session, we will need similar functionality for other tools as well. e.g.,
That's a good point. @JongHeonChoi can you do a size comparison of dotnet-stack before and after your patch? We should also check the single-file distribution form as well (run the |
To save time I'd suggest there is no need to create a full patch to calculate this. I am fine assuming that the new code being written will have neglible size and the only thing we need to measure is the size of the new binary dependencies. So any change that adds the dependencies to the tool and then builds the bundle should be good enough as a measurement. |
Run the script as follows: |
@noahfalk @josalem |
I went ahead and did a size comparison for adding the This is large relative to the current size of I think Before we discuss implementation, we should finalize the usage of the tool. Does the following seem agreeable?
e.g.,
|
Sorry for replying so late. I agree with your proposal.
Additionally I think interactive input could be useful to the developers. Perhaps the tool will be used like this:
2. If assembly and pdb are separated in each directory.
3. Added the I think this is the best usage of the tool:
Do you agree with me? |
I'm curious about the interactive mode. Is there a specific use case where that becomes more helpful than just inputting the file containing the text? My preference would be to only have an input file since that simplifies usage and is more in line with the other tools' usages, but I'm open to adding it. CC @shirhatti I had a couple minor edits to your proposal, but I think it is good so far. # dotnet dotnet-stack -h
Usage:
dotnet-stack [command]
Commands:
report reports the managed stacks from a running .NET process
ps Lists the dotnet processes that traces can be collected
symbolicate Use Method Tokens and IL Offsets to symbolicate a stacktrace
# dotnet dotnet-stack symbolicate -h
symbolicate:
Get the line number from the Method Token and IL Offset at the stacktrace
Usage:
dotnet-stack symbolicate [options] <input-file/wildcard>
Options:
-d, --search-dir <dir1;dir2;...> Path of multiple directories with assembly and pdb separated by colon(';')
-o, --output <output_path> Output directly to a file.
-?, -h, --help Show help and usage information
|
@josalem Thank you. |
I changed branch name. And I uploaded a new PR(#2436). |
Add the dotnet-extractor tool.
(I'd like to get a suitable name. dotnet-extractor? dotnet-converter?)
To use dotnet-extractor, use the following:
dotnet-extractor convert --input <exception_file_path> --assembly <assembly_directories> --pdb <pdb_directories> --output <result_file_path>
Related PR : dotnet/runtime#44013
Example: