mirror of
https://github.com/wolfpld/tracy
synced 2025-04-28 20:23:51 +00:00
Compare commits
4 Commits
97f54f539d
...
05b5f1cfe1
Author | SHA1 | Date | |
---|---|---|---|
|
05b5f1cfe1 | ||
|
8bdae80960 | ||
|
4f76fb2cda | ||
|
db734e3e0a |
4
NEWS
4
NEWS
@ -21,6 +21,10 @@ v0.x.x (xxxx-xx-xx)
|
|||||||
- Added support for Direct3D 11 instrumentation.
|
- Added support for Direct3D 11 instrumentation.
|
||||||
- Vulkan contexts can be now calibrated on Linux.
|
- Vulkan contexts can be now calibrated on Linux.
|
||||||
- Support loading zstd-compressed chrome traces.
|
- Support loading zstd-compressed chrome traces.
|
||||||
|
- Chrome traces with multiple PID entries (and possibly conflicting TIDs)
|
||||||
|
can be now imported. A pseudo-TID will be created for each PID+TID pair
|
||||||
|
in such circumstances.
|
||||||
|
- Added support for custom source location tag ("loc") in chrome traces.
|
||||||
|
|
||||||
|
|
||||||
v0.7.7 (2021-04-01)
|
v0.7.7 (2021-04-01)
|
||||||
|
@ -199,6 +199,23 @@ int main( int argc, char** argv )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string locFile;
|
||||||
|
uint32_t locLine = 0;
|
||||||
|
if( v.contains( "loc" ) )
|
||||||
|
{
|
||||||
|
auto loc = v["loc"].get<std::string>();
|
||||||
|
const auto lpos = loc.find_last_of( ':' );
|
||||||
|
if( lpos == std::string::npos )
|
||||||
|
{
|
||||||
|
std::swap( loc, locFile );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
locFile = loc.substr( 0, lpos );
|
||||||
|
locLine = atoi( loc.c_str() + lpos + 1 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if( type == "B" )
|
if( type == "B" )
|
||||||
{
|
{
|
||||||
timeline.emplace_back( tracy::Worker::ImportEventTimeline {
|
timeline.emplace_back( tracy::Worker::ImportEventTimeline {
|
||||||
@ -206,7 +223,9 @@ int main( int argc, char** argv )
|
|||||||
uint64_t( v["ts"].get<double>() * 1000. ),
|
uint64_t( v["ts"].get<double>() * 1000. ),
|
||||||
v["name"].get<std::string>(),
|
v["name"].get<std::string>(),
|
||||||
std::move(zoneText),
|
std::move(zoneText),
|
||||||
false
|
false,
|
||||||
|
std::move(locFile),
|
||||||
|
locLine
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
else if( type == "E" )
|
else if( type == "E" )
|
||||||
@ -225,7 +244,7 @@ int main( int argc, char** argv )
|
|||||||
const auto ts0 = uint64_t( v["ts"].get<double>() * 1000. );
|
const auto ts0 = uint64_t( v["ts"].get<double>() * 1000. );
|
||||||
const auto ts1 = ts0 + uint64_t( v["dur"].get<double>() * 1000. );
|
const auto ts1 = ts0 + uint64_t( v["dur"].get<double>() * 1000. );
|
||||||
const auto name = v["name"].get<std::string>();
|
const auto name = v["name"].get<std::string>();
|
||||||
timeline.emplace_back( tracy::Worker::ImportEventTimeline { tid, ts0, name, std::move(zoneText), false } );
|
timeline.emplace_back( tracy::Worker::ImportEventTimeline { tid, ts0, name, std::move(zoneText), false, std::move(locFile), locLine } );
|
||||||
timeline.emplace_back( tracy::Worker::ImportEventTimeline { tid, ts1, "", "", true } );
|
timeline.emplace_back( tracy::Worker::ImportEventTimeline { tid, ts1, "", "", true } );
|
||||||
}
|
}
|
||||||
else if( type == "i" || type == "I" )
|
else if( type == "i" || type == "I" )
|
||||||
|
@ -3387,14 +3387,21 @@ logo=\bclampe
|
|||||||
Tracy can import traces compressed with the Zstandard algorithm (for example, using the \texttt{zstd} command-line utility). Traces ending with \texttt{.zst} extension are assumed to be compressed.
|
Tracy can import traces compressed with the Zstandard algorithm (for example, using the \texttt{zstd} command-line utility). Traces ending with \texttt{.zst} extension are assumed to be compressed.
|
||||||
\end{bclogo}
|
\end{bclogo}
|
||||||
|
|
||||||
|
\begin{bclogo}[
|
||||||
|
noborder=true,
|
||||||
|
couleur=black!5,
|
||||||
|
logo=\bclampe
|
||||||
|
]{Source locations}
|
||||||
|
Chrome tracing format doesn't document a way to provide source location data. The \texttt{import-chrome} utility will however recognize a custom \texttt{loc} tag in the root of zone begin events. You should be formatting this data in the usual \texttt{filename:line} style, for example: \texttt{hello.c:42}. Providing the line number (including a colon) is optional, but highly recommended.
|
||||||
|
\end{bclogo}
|
||||||
|
|
||||||
\begin{bclogo}[
|
\begin{bclogo}[
|
||||||
noborder=true,
|
noborder=true,
|
||||||
couleur=black!5,
|
couleur=black!5,
|
||||||
logo=\bcattention
|
logo=\bcattention
|
||||||
]{Limitations}
|
]{Limitations}
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
\item Tracy is a single-process profiler. There is no differentiation between data coming from different pids.
|
\item Tracy is a single-process profiler. Should the imported trace contain PID entries, each PID+TID pair will create a new \emph{pseudo-TID} number. If you want to preserve the original TID numbers, your traces should omit PID entries.
|
||||||
\item Tracy uses thread identifiers assigned by the operating system. This means that no two concurrent threads can have the same tid. Be aware that some external data formats may encourage usage of duplicated thread identifiers.
|
|
||||||
\item The imported data may be severely limited, either by not mapping directly to the data structures used by Tracy, or by following undocumented practices.
|
\item The imported data may be severely limited, either by not mapping directly to the data structures used by Tracy, or by following undocumented practices.
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
\end{bclogo}
|
\end{bclogo}
|
||||||
|
@ -321,8 +321,8 @@ Worker::Worker( const char* name, const char* program, const std::vector<ImportE
|
|||||||
SourceLocation srcloc {
|
SourceLocation srcloc {
|
||||||
StringRef(),
|
StringRef(),
|
||||||
StringRef( StringRef::Idx, StoreString( v.name.c_str(), v.name.size() ).idx ),
|
StringRef( StringRef::Idx, StoreString( v.name.c_str(), v.name.size() ).idx ),
|
||||||
StringRef(),
|
StringRef( StringRef::Idx, StoreString( v.locFile.c_str(), v.locFile.size() ).idx ),
|
||||||
0,
|
v.locLine,
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
int key;
|
int key;
|
||||||
|
@ -99,6 +99,8 @@ public:
|
|||||||
std::string name;
|
std::string name;
|
||||||
std::string text;
|
std::string text;
|
||||||
bool isEnd;
|
bool isEnd;
|
||||||
|
std::string locFile;
|
||||||
|
uint32_t locLine;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ImportEventMessages
|
struct ImportEventMessages
|
||||||
|
Loading…
x
Reference in New Issue
Block a user