本文整理汇总了C++中TRACE_EVENT函数的典型用法代码示例。如果您正苦于以下问题:C++ TRACE_EVENT函数的具体用法?C++ TRACE_EVENT怎么用?C++ TRACE_EVENT使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了TRACE_EVENT函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TRACE_EVENT
bool
_ppt::has_schemas(void)
{
TRACE_EVENT("+_ppt::has_schemas", TRACE_TYPE_VERBOSE);
bool result = !_schema.empty();
TRACE_EVENT("-_ppt::has_schemas", TRACE_TYPE_VERBOSE);
return result;
}
示例2: _active
_ppt::_ppt(
const _ppt &other
) :
_active(other._active),
_argument_action(other._argument_action),
_generic_action(other._generic_action),
_exception_action(other._exception_action),
_schema(other._schema)
{
TRACE_EVENT("+_ppt::_ppt", TRACE_TYPE_INFORMATION);
TRACE_EVENT("-_ppt::_ppt", TRACE_TYPE_INFORMATION);
}
示例3: ASSERT
void CCThreadProxy::commitOnCCThread(CCCompletionEvent* completion)
{
ASSERT(isImplThread());
TRACE_EVENT("CCThreadProxy::commitOnCCThread", this, 0);
m_layerTreeHostImpl->beginCommit();
{
TRACE_EVENT("CCLayerTreeHost::commit", this, 0);
m_layerTreeHost->commitTo(m_layerTreeHostImpl.get());
}
completion->signal();
m_layerTreeHostImpl->commitComplete();
setNeedsRedrawOnCCThread();
}
示例4: TRACE_EVENT
void CCThreadProxy::beginFrameAndCommit(int sequenceNumber, double frameBeginTime, PassOwnPtr<CCScrollUpdateSet> scrollInfo)
{
TRACE_EVENT("CCThreadProxy::beginFrameAndCommit", this, 0);
ASSERT(isMainThread());
if (!m_layerTreeHost)
return;
// Scroll deltas need to be applied even if the commit will be dropped.
m_layerTreeHost->applyScrollDeltas(*scrollInfo.get());
// Drop beginFrameAndCommit calls that occur out of sequence. See createBeginFrameAndCommitTaskOnImplThread for
// an explanation of how out-of-sequence beginFrameAndCommit tasks can occur.
if (sequenceNumber < m_lastExecutedBeginFrameAndCommitSequenceNumber) {
TRACE_EVENT("EarlyOut_StaleBeginFrameAndCommit", this, 0);
return;
}
m_lastExecutedBeginFrameAndCommitSequenceNumber = sequenceNumber;
// FIXME: recreate the context if it was requested by the impl thread
{
TRACE_EVENT("CCLayerTreeHost::animateAndLayout", this, 0);
m_layerTreeHost->animateAndLayout(frameBeginTime);
}
ASSERT(m_lastExecutedBeginFrameAndCommitSequenceNumber == sequenceNumber);
// Clear the commit flag after animateAndLayout here --- objects that only
// layout when painted will trigger another setNeedsCommit inside
// updateLayers.
m_commitRequested = false;
m_layerTreeHost->updateLayers();
{
// Blocking call to CCThreadProxy::commitOnImplThread
TRACE_EVENT("commit", this, 0);
CCCompletionEvent completion;
s_ccThread->postTask(createCCThreadTask(this, &CCThreadProxy::commitOnImplThread, AllowCrossThreadAccess(&completion)));
completion.wait();
}
m_layerTreeHost->commitComplete();
if (m_redrawAfterCommit)
setNeedsRedraw();
m_redrawAfterCommit = false;
ASSERT(m_lastExecutedBeginFrameAndCommitSequenceNumber == sequenceNumber);
}
示例5: main
int main(int argc, char *argv[])
{
volatile uint64_t workcnt = 0;
int nthreads;
debug_printf("bomptest started.\n");
bench_init();
#if CONFIG_TRACE
errval_t err = trace_control(TRACE_EVENT(TRACE_SUBSYS_ROUTE,
TRACE_EVENT_ROUTE_BENCH_START, 0),
TRACE_EVENT(TRACE_SUBSYS_ROUTE,
TRACE_EVENT_ROUTE_BENCH_STOP, 0), 0);
assert(err_is_ok(err));
#endif
if(argc == 2) {
nthreads = atoi(argv[1]);
backend_span_domain(nthreads, STACK_SIZE);
bomp_custom_init(NULL);
omp_set_num_threads(nthreads);
} else {
assert(!"Specify number of threads");
}
trace_event(TRACE_SUBSYS_ROUTE, TRACE_EVENT_ROUTE_BENCH_START, 0);
uint64_t start = bench_tsc();
#pragma omp parallel
while(rdtsc() < start + 805000000ULL) {
workcnt++;
}
uint64_t end = bench_tsc();
trace_event(TRACE_SUBSYS_ROUTE, TRACE_EVENT_ROUTE_BENCH_STOP, 0);
printf("done. time taken: %" PRIu64 " cycles.\n", end - start);
#if CONFIG_TRACE
char *buf = malloc(4096*4096);
trace_dump(buf, 4096*4096, NULL);
printf("%s\n", buf);
#endif
for(;;);
return 0;
}
示例6: TRACE_EVENT
void LayerTextureSubImage::uploadWithTexSubImage(const uint8_t* image, const IntRect& imageRect,
const IntRect& sourceRect, const IntRect& destRect,
GC3Denum format, GraphicsContext3D* context)
{
TRACE_EVENT("LayerTextureSubImage::uploadWithTexSubImage", this, 0);
if (!m_subImage)
m_subImage = adoptArrayPtr(new uint8_t[m_subImageSize.width() * m_subImageSize.height() * 4]);
// Offset from image-rect to source-rect.
IntPoint offset(sourceRect.x() - imageRect.x(), sourceRect.y() - imageRect.y());
const uint8_t* pixelSource;
if (imageRect.width() == sourceRect.width() && !offset.x())
pixelSource = &image[4 * offset.y() * imageRect.width()];
else {
// Strides not equal, so do a row-by-row memcpy from the
// paint results into a temp buffer for uploading.
for (int row = 0; row < destRect.height(); ++row)
memcpy(&m_subImage[destRect.width() * 4 * row],
&image[4 * (offset.x() + (offset.y() + row) * imageRect.width())],
destRect.width() * 4);
pixelSource = &m_subImage[0];
}
context->texSubImage2D(GraphicsContext3D::TEXTURE_2D, 0, destRect.x(), destRect.y(), destRect.width(), destRect.height(), format, GraphicsContext3D::UNSIGNED_BYTE, pixelSource);
}
示例7: paintSkBitmap
static void paintSkBitmap(PlatformContextSkia* platformContext, const NativeImageSkia& bitmap, const SkIRect& srcRect, const SkRect& destRect, const SkXfermode::Mode& compOp)
{
#if PLATFORM(CHROMIUM)
TRACE_EVENT("paintSkBitmap", platformContext, 0);
#endif
SkPaint paint;
paint.setXfermodeMode(compOp);
paint.setFilterBitmap(true);
paint.setAlpha(platformContext->getNormalizedAlpha());
paint.setLooper(platformContext->getDrawLooper());
// only antialias if we're rotated or skewed
paint.setAntiAlias(hasNon90rotation(platformContext));
SkCanvas* canvas = platformContext->canvas();
ResamplingMode resampling;
if (platformContext->isAccelerated())
resampling = RESAMPLE_LINEAR;
else
resampling = platformContext->printing() ? RESAMPLE_NONE :
computeResamplingMode(platformContext, bitmap, srcRect.width(), srcRect.height(), SkScalarToFloat(destRect.width()), SkScalarToFloat(destRect.height()));
if (resampling == RESAMPLE_AWESOME) {
drawResampledBitmap(*canvas, paint, bitmap, srcRect, destRect);
} else {
// No resampling necessary, we can just draw the bitmap. We want to
// filter it if we decided to do linear interpolation above, or if there
// is something interesting going on with the matrix (like a rotation).
// Note: for serialization, we will want to subset the bitmap first so
// we don't send extra pixels.
canvas->drawBitmapRect(bitmap.bitmap(), &srcRect, destRect, &paint);
}
platformContext->didDrawRect(destRect, paint, &bitmap.bitmap());
}
示例8: TRACE_EVENT
void CCThreadProxy::initializeImplOnCCThread(CCCompletionEvent* completion)
{
TRACE_EVENT("CCThreadProxy::initializeImplOnCCThread", this, 0);
ASSERT(isImplThread());
m_layerTreeHostImpl = m_layerTreeHost->createLayerTreeHostImpl();
completion->signal();
}
示例9: trace_mpi_callers
void trace_mpi_callers(iotimer_t time, int offset, int type)
{
CONTEXT ctx;
int rc = 0, actual_deep = 1;
/* Leave if they aren't initialized (asked by user!) */
if (Trace_Caller[CALLER_MPI] == NULL)
return;
exc_capture_context (&ctx);
/* Unwind de la pila*/
while (!rc && ctx.sc_pc && actual_deep <= Caller_Deepness[type]+offset)
{
#ifdef MPICALLER_DEBUG
/* Tampoco tenemos backtrace_symbols. Solo printamos las direcciones. */
fprintf(stderr, "[%d] 0x%012lx\n", actual_deep, ctx.sc_pc);
#endif
if (actual_deep >= offset)
if (Trace_MPI_Caller[actual_deep-offset])
TRACE_EVENT(time, MPI_CALLER_EVENT_TYPE(actual_deep-offset+1),
(UINT64)ctx.sc_pc);
rc = exc_virtual_unwind(0, &ctx);
actual_deep ++;
}
}