/ Check-in [4e88042f]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:When VDBE_PROFILE is enabled, ignore negative opcode times, which sometimes occur, perhaps due to context swaps.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4e88042f9d3e678914da96c0eb276f3d8fca5a94
User & Date: drh 2014-04-25 12:35:31
Context
2014-04-25
14:42
Make sure ORDER BY clauses on joins that involve virtual tables and that have a DISTINCT clause work correctly. This is a candidate fix for ticket [388d01d4bb8f9]. Test cases for that ticket will be checked in separately. check-in: 17113812 user: drh tags: trunk
12:35
When VDBE_PROFILE is enabled, ignore negative opcode times, which sometimes occur, perhaps due to context swaps. check-in: 4e88042f user: drh tags: trunk
2014-04-21
13:36
Comment tweaks on the test case for the [b75a9ca6b0] bug fix. check-in: 65d2544a user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbe.c.

  6319   6319   ** readability.  From this point on down, the normal indentation rules are
  6320   6320   ** restored.
  6321   6321   *****************************************************************************/
  6322   6322       }
  6323   6323   
  6324   6324   #ifdef VDBE_PROFILE
  6325   6325       {
  6326         -      u64 elapsed = sqlite3Hwtime() - start;
  6327         -      pOp->cycles += elapsed;
         6326  +      u64 endTime = sqlite3Hwtime();
         6327  +      if( endTime>start ) pOp->cycles += endTime - start;
  6328   6328         pOp->cnt++;
  6329   6329       }
  6330   6330   #endif
  6331   6331   
  6332   6332       /* The following code adds nothing to the actual functionality
  6333   6333       ** of the program.  It is only here for testing and debugging.
  6334   6334       ** On the other hand, it does burn CPU cycles every time through