diff options
author | Simon Cruanes <simon.cruanes.2007@m4x.org> | 2021-05-10 17:59:03 +0300 |
---|---|---|
committer | Simon Cruanes <simon.cruanes.2007@m4x.org> | 2021-05-10 17:59:03 +0300 |
commit | 7e694d452ab6a0453b62d50a30e71d9890222be1 (patch) | |
tree | 9e3f75475cfab95dec6611b657e67303cdeca727 /import-chrome | |
parent | b71c9c12c4a9b72159e755beb45dafebf58bdff1 (diff) |
improve chrome importer to better display string arguments
Diffstat (limited to 'import-chrome')
-rw-r--r-- | import-chrome/src/import-chrome.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/import-chrome/src/import-chrome.cpp b/import-chrome/src/import-chrome.cpp index 9c909b38..58314994 100644 --- a/import-chrome/src/import-chrome.cpp +++ b/import-chrome/src/import-chrome.cpp @@ -177,7 +177,11 @@ int main( int argc, char** argv ) { for ( auto& kv : v["args"].items() ) { - zoneText += kv.key() + ": " + kv.value().dump() + "\n"; + const auto val = kv.value(); + const std::string s = + val.is_string() ? + val.get<std::string>() : val.dump(); + zoneText += kv.key() + ": " + s + "\n"; } } @@ -208,7 +212,7 @@ int main( int argc, char** argv ) } else if( type == "X" ) { - const auto tid = v["tid"].get<uint64_t>(); + const auto tid = getTid(pid, v["tid"].get<uint64_t>()); const auto ts0 = uint64_t( v["ts"].get<double>() * 1000. ); const auto ts1 = ts0 + uint64_t( v["dur"].get<double>() * 1000. ); const auto name = v["name"].get<std::string>(); |