Lines Matching defs:snapshots

40 // - do snapshots on some specific client requests
49 // - With --stack=yes, want to add a stack trace for detailed snapshots so
80 // - (Andy Lin) Give a stack trace on detailed snapshots?
129 - can completely separate connection between snapshots and trees.
146 Number of snapshots: 50
147 Detailed snapshots: [2, 11, 13, 19, 25, 32 (peak)]
202 // snapshots:
204 // is to always have a certain number of temporary snapshots around. So
208 // normal snapshots, a small fraction are detailed snapshots.
214 // - User-requested snapshots: These are done in response to client
278 // snapshots until the first basic block is executed, rather than doing it in
283 // would be an artificial time gap between the first and second snapshots.
285 // When running with --heap=yes --pages-as-heap=yes, snapshots start much
444 else if VG_BINT_CLO(arg, "--max-snapshots", clo_max_snapshots, 10, 1000) {}
470 " --max-snapshots=<N> maximum number of snapshots recorded [100]\n"
769 // Sanity checking: we check SXTrees (which are in snapshots) after
770 // snapshots are created, before they are deleted, and before they are
952 // the output snapshots may not add up the way they might expect.
1029 static Snapshot* snapshots; // Array of snapshots.
1054 return &snapshots[0] == snapshot // First snapshot
1055 || &snapshots[next_snapshot_i-1] == snapshot // Last snapshot
1071 tl_assert( is_snapshot_in_use( & snapshots[i] ));
1074 tl_assert(!is_snapshot_in_use( & snapshots[i] ));
1080 // can't sanity check at startup when clearing the initial snapshots because
1109 Snapshot* snapshot = &snapshots[i];
1127 // Cull half the snapshots; we choose those that represent the smallest
1128 // time-spans, because that gives us the most even distribution of snapshots
1131 // Algorithm for N snapshots: We find the snapshot representing the smallest
1132 // timeframe, and remove it. We repeat this until (N/2) snapshots are gone.
1134 // smallest snapshots in one hit, because when a snapshot is removed, its
1138 // Once we're done, we return the new smallest interval between snapshots.
1151 j < clo_max_snapshots && !is_snapshot_in_use(&snapshots[j]); \
1156 // First we remove enough snapshots by clearing them in-place. Once
1161 // snapshot A and B. We don't consider the first and last snapshots for
1174 Time timespan = snapshots[jn].time - snapshots[jp].time;
1177 if (Peak != snapshots[j].kind && timespan < min_timespan) {
1189 min_snapshot = & snapshots[ min_j ];
1199 // Slide down the remaining snapshots over the removed ones. First set i
1202 for (i = 0; is_snapshot_in_use( &snapshots[i] ); i++) { }
1203 for (j = i; !is_snapshot_in_use( &snapshots[j] ); j++) { }
1205 if (is_snapshot_in_use( &snapshots[j] )) {
1206 snapshots[i++] = snapshots[j];
1207 clear_snapshot(&snapshots[j], /*do_sanity_check*/True);
1212 // Check snapshots array looks ok after changes.
1221 // But we have to be careful -- some snapshots (eg. snapshot 0, and the
1222 // peak snapshot) are uncullable. If two uncullable snapshots end up
1225 // time between the remaining cullable snapshots will grow ever larger.
1227 // two uncullable snapshots, and it will be much smaller than it should
1229 // ignore any timespans between two uncullable snapshots.
1234 if (is_uncullable_snapshot(&snapshots[i]) &&
1235 is_uncullable_snapshot(&snapshots[i-1]))
1239 Time timespan = snapshots[i].time - snapshots[i-1].time;
1249 // Print remaining snapshots, if necessary.
1256 VERB(2, "New time interval = %lld (between snapshots %d and %d)\n",
1276 // first two snapshots. But at least users won't have to wonder why
1340 // 'min_time_interval' is the minimum time interval between snapshots.
1343 // initialised to zero so that we begin by taking snapshots as quickly as
1389 snapshot = & snapshots[next_snapshot_i];
1412 if (Peak == snapshots[i].kind) {
1413 snapshots[i].kind = Normal;
1803 // Record the first N-1 pages as blocks, but don't do any snapshots.
2104 //--- Writing snapshots ---//
2316 write_snapshots_to_file (massif_out_file, snapshots, next_snapshot_i);
2352 snapshots, next_snapshot_i);
2418 STATS("skipped snapshots: %u\n", n_skipped_snapshots);
2419 STATS("real snapshots: %u\n", n_real_snapshots);
2420 STATS("detailed snapshots: %u\n", n_detailed_snapshots);
2421 STATS("peak snapshots: %u\n", n_peak_snapshots);
2537 snapshots = VG_(malloc)("ms.main.mpoci.1",
2542 clear_snapshot( & snapshots[i], /*do_sanity_check*/False );