OEMCrypto Profiler - Merge of Widevine Updates

This change is a merge of the following changes:
1. Remove MultipleSessions (go/wvgerrit/16763)
2. Increase Memory Budget (go/wvgerrit/16764)
3. Fixing Possible Integer Overflow (go/wvgerrit/16765)
4. Creating Call Table (go/wvgerrit/16766)
5. Creating Call History (go/wvgerrit/16767)
6. Connecting Profiled Scope (go/wvgerrit/16768)
7. Adding Call Table Version Number (go/wvgerrit/16780)
8. Add Version Number to Call History (go/wvgerrit/16781)

bug: 27157796

Change-Id: Ia3f088a1714f3f5b426fee6141daa4ea8d832cf4
This commit is contained in:
Aaron Vaage
2016-02-12 15:43:37 -08:00
committed by Jeff Tinker
parent 9c82455e8f
commit 0d77fecfb5
12 changed files with 457 additions and 153 deletions

View File

@@ -14,26 +14,16 @@ namespace oemprofiler {
class ProfiledScope {
public:
explicit ProfiledScope(OEM_FUNCTION fid);
explicit ProfiledScope(uint32_t sid, OEM_FUNCTION fid);
~ProfiledScope();
EntryWriter meta_data_;
// All profiling data must be assigned to a session but some oem
// crypto calls are not associated with crypto sessions. To gather
// those functions' data, the global session id is used. Crypto.Session
// Ids are unsigned 32 bit integers. To use those as a profiling session
// id but also allow for a global id that won't conflict with them,
// we use a -1 as the a proifiling session id is a signed 64 bit integer.
static const int64_t kGlobalSID = -1;
private:
int64_t sid_;
OEM_FUNCTION fid_;
uint64_t start_time_;
void Submit(int64_t sid, uint64_t end_time) const;
void Submit(uint64_t end_time) const;
uint64_t GetNowUS() const;
// disallow copy and assign