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

TraceParserGen? #336

Closed
rovarma opened this issue Aug 2, 2017 · 4 comments
Closed

TraceParserGen? #336

rovarma opened this issue Aug 2, 2017 · 4 comments

Comments

@rovarma
Copy link
Contributor

rovarma commented Aug 2, 2017

In the docs for TraceEvent, the TraceParserGen tool is referenced as a way to generate parsers for custom events. This seems useful, but I'm unable to find it in the repository. Is the tool (or its source) available somewhere?

I've found older copies here and on OneDrive, but I'm not sure what the state of these are.

Thanks!

@vancem
Copy link
Contributor

vancem commented Aug 8, 2017

The copy on the OneDrive is the latest. It has not changed in quite a while. The other is a fork but I don't know anything about it.

Moving it to this repo is interesting if someone wants to make a PR for it. The one-drive thing predated the PerfView git repository.

@rovarma
Copy link
Contributor Author

rovarma commented Aug 9, 2017

Alright, thanks. I have done so here: #344.

@vancem
Copy link
Contributor

vancem commented Aug 11, 2017

Resolved by #344.. Thanks @rovarma for doing this.

@vancem
Copy link
Contributor

vancem commented Jan 11, 2018

TraceParseGen source lives in the PerfView GitHub.

https://github.com/Microsoft/perfview/tree/master/src/TraceParserGen

You can build it simply by doing 'msbuild' in the TraceParserGen directory. The binary ends up in bin\Debug\TraceParserGen.exe

Simple cases are simple: TraceParserGen will generate a *.cs file that has the parser for that manifest. However there are many manifests that use unusual types or formats that will confuse the parser generator (but you can usually just skip out the bad code and use what is left, it just won't parse every event from the manifest).

TraceParserGen /? will give you some useful help. In particular it will tell you the two most common ways of getting manifest that you feed to it.

OS providers can be listed using 'logMan query Providers' and a manifest obtained by doing

  • PerfView /nogui userCommand DumpRegisteredManifest PROVIDER_NAME

EventSource manifests can be obtained from an ETL file containing EventSource data using

  • PerfView /nogui userCommand DumpEventSourceManifests etlFileName

If the DLL containing the EventSource is available, TraceParserGen can use it directly with the /EventSource qualifier.

Also see the TraceEvent Programmers Guide and in particular the Building TraceEventParsers section for more

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

No branches or pull requests

2 participants