Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4878a757 authored by Kean Mariotti's avatar Kean Mariotti Committed by Android (Google) Code Review
Browse files

Merge "Traces with real-to-elapsed time offset"

parents afeefacc c44fdafd
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -89,6 +89,9 @@ LayersTraceFileProto LayerTracing::createTraceFileProto() const {
    LayersTraceFileProto fileProto;
    fileProto.set_magic_number(uint64_t(LayersTraceFileProto_MagicNumber_MAGIC_NUMBER_H) << 32 |
                               LayersTraceFileProto_MagicNumber_MAGIC_NUMBER_L);
    auto timeOffsetNs = static_cast<std::uint64_t>(systemTime(SYSTEM_TIME_REALTIME) -
                                                   systemTime(SYSTEM_TIME_MONOTONIC));
    fileProto.set_real_to_elapsed_time_offset_nanos(timeOffsetNs);
    return fileProto;
}

+3 −0
Original line number Diff line number Diff line
@@ -134,6 +134,9 @@ proto::TransactionTraceFile TransactionTracing::createTraceFileProto() const {
    proto::TransactionTraceFile proto;
    proto.set_magic_number(uint64_t(proto::TransactionTraceFile_MagicNumber_MAGIC_NUMBER_H) << 32 |
                           proto::TransactionTraceFile_MagicNumber_MAGIC_NUMBER_L);
    auto timeOffsetNs = static_cast<std::uint64_t>(systemTime(SYSTEM_TIME_REALTIME) -
                                                   systemTime(SYSTEM_TIME_MONOTONIC));
    proto.set_real_to_elapsed_time_offset_nanos(timeOffsetNs);
    return proto;
}

+4 −0
Original line number Diff line number Diff line
@@ -38,6 +38,10 @@ message LayersTraceFileProto {

    optional fixed64 magic_number = 1;  /* Must be the first field, set to value in MagicNumber */
    repeated LayersTraceProto entry = 2;

    /* offset between real-time clock and elapsed time clock in nanoseconds.
       Calculated as: systemTime(SYSTEM_TIME_REALTIME) - systemTime(SYSTEM_TIME_MONOTONIC) */
    optional fixed64 real_to_elapsed_time_offset_nanos = 3;
}

/* one layers trace entry. */
+4 −0
Original line number Diff line number Diff line
@@ -36,6 +36,10 @@ message TransactionTraceFile {

    fixed64 magic_number = 1; /* Must be the first field, set to value in MagicNumber */
    repeated TransactionTraceEntry entry = 2;

    /* offset between real-time clock and elapsed time clock in nanoseconds.
       Calculated as: systemTime(SYSTEM_TIME_REALTIME) - systemTime(SYSTEM_TIME_MONOTONIC) */
    fixed64 real_to_elapsed_time_offset_nanos = 3;
}

message TransactionTraceEntry {