diff options
author | Jason Sams <rjsams@android.com> | 2009-08-19 12:17:14 -0700 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2009-08-19 12:17:14 -0700 |
commit | f4d160653fe405eba9d6f55448ac4599c6cadd77 (patch) | |
tree | 0e426bfc5a60d271a95a6450e8414b570237c818 /libs/rs/rsThreadIO.cpp | |
parent | 730ee65d4ddb307898053b623120bad1655fadad (diff) | |
download | frameworks_base-f4d160653fe405eba9d6f55448ac4599c6cadd77.zip frameworks_base-f4d160653fe405eba9d6f55448ac4599c6cadd77.tar.gz frameworks_base-f4d160653fe405eba9d6f55448ac4599c6cadd77.tar.bz2 |
Improved RS timing code to monitor where we spend CPU time.
Diffstat (limited to 'libs/rs/rsThreadIO.cpp')
-rw-r--r-- | libs/rs/rsThreadIO.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/rs/rsThreadIO.cpp b/libs/rs/rsThreadIO.cpp index 20b0a94..4a1dbbb 100644 --- a/libs/rs/rsThreadIO.cpp +++ b/libs/rs/rsThreadIO.cpp @@ -32,12 +32,18 @@ ThreadIO::~ThreadIO() bool ThreadIO::playCoreCommands(Context *con, bool waitForCommand) { - uint32_t cmdID = 0; - uint32_t cmdSize = 0; bool ret = false; while(!mToCore.isEmpty() || waitForCommand) { + uint32_t cmdID = 0; + uint32_t cmdSize = 0; ret = true; +#if RS_LOG_TIMES + con->timerSet(Context::RS_TIMER_IDLE); +#endif const void * data = mToCore.get(&cmdID, &cmdSize); +#if RS_LOG_TIMES + con->timerSet(Context::RS_TIMER_INTERNAL); +#endif waitForCommand = false; //LOGV("playCoreCommands 3 %i %i", cmdID, cmdSize); |