当前位置: 首页>>代码示例>>C++>>正文


C++ TRACE_EVENT函数代码示例

本文整理汇总了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;
}
开发者ID:majestic53old,项目名称:nimble-lang,代码行数:11,代码来源:ppt.cpp

示例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);
}
开发者ID:majestic53old,项目名称:nimble-lang,代码行数:12,代码来源:ppt.cpp

示例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();
}
开发者ID:Xertz,项目名称:EAWebKit,代码行数:14,代码来源:CCThreadProxy.cpp

示例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);
}
开发者ID:1833183060,项目名称:wke,代码行数:49,代码来源:CCThreadProxy.cpp

示例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;
}
开发者ID:joe9,项目名称:barrelfish,代码行数:48,代码来源:test.c

示例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);
}
开发者ID:Moondee,项目名称:Artemis,代码行数:26,代码来源:LayerTextureSubImage.cpp

示例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());
}
开发者ID:bearmingo,项目名称:UI,代码行数:33,代码来源:ImageSkia.cpp

示例8: TRACE_EVENT

void CCThreadProxy::initializeImplOnCCThread(CCCompletionEvent* completion)
{
    TRACE_EVENT("CCThreadProxy::initializeImplOnCCThread", this, 0);
    ASSERT(isImplThread());
    m_layerTreeHostImpl = m_layerTreeHost->createLayerTreeHostImpl();
    completion->signal();
}
开发者ID:Xertz,项目名称:EAWebKit,代码行数:7,代码来源:CCThreadProxy.cpp

示例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 ++;
	}	    
}
开发者ID:gllort,项目名称:extrae,代码行数:27,代码来源:calltrace.c


注:本文中的TRACE_EVENT函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。