mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 20:25:07 +00:00
ProfileViewer: Add basic support for loading "perfcore" files
"perfcore" is the file that the kernel generates after a process that was recording performance events has exited. This patch teaches ProfileViewer how to load (and symbolicate!) those files so that we can look at them. This will need a bunch more work to make it truly useful.
This commit is contained in:
parent
fa97ff1c83
commit
266d7ca268
3 changed files with 74 additions and 1 deletions
|
@ -43,8 +43,14 @@ int main(int argc, char** argv)
|
|||
}
|
||||
|
||||
const char* path = argv[1];
|
||||
OwnPtr<Profile> profile;
|
||||
|
||||
if (!strcmp(path, "perfcore")) {
|
||||
profile = Profile::load_from_perfcore_file(path);
|
||||
} else {
|
||||
profile = Profile::load_from_file(path);
|
||||
}
|
||||
|
||||
auto profile = Profile::load_from_file(path);
|
||||
if (!profile) {
|
||||
fprintf(stderr, "Unable to load profile '%s'\n", path);
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue