首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我无法将Android HPROF转换为棒棒糖上的标准HPROF

我无法将Android HPROF转换为棒棒糖上的标准HPROF
EN

Stack Overflow用户
提问于 2015-09-05 11:41:32
回答 1查看 472关注 0票数 3

我的测试设备版本是5.0.1 (棒棒糖)。

我在Android Studio 1.3中得到了Android堆转储文件。

但我看到了错误消息。

因此,我尝试在DDMS中获取转储文件(示例文件名: android.hprof)。

然后我尝试将Android HPROF转换为标准的HPROF文件。

代码语言:javascript
复制
hprof-conv android.hprof standard.hprof

则返回为ERROR: read 40070 of 65559 byteshprof-conv消息

谁来帮帮我。

EN

回答 1

Stack Overflow用户

发布于 2019-03-25 16:43:34

https://android.googlesource.com/platform/dalvik.git/+/android-4.2.2_r1/tools/hprof-conv/HprofConv.c#221

代码语言:javascript
复制
/*
 * Read some data, adding it to the expanding buffer.
 *
 * This will ensure that the buffer has enough space to hold the new data
 * (plus the previous contents).
 */
static int ebReadData(ExpandBuf* pBuf, FILE* in, size_t count, int eofExpected)
{
    size_t actual;
    assert(count > 0);
    ebEnsureCapacity(pBuf, count);
    actual = fread(pBuf->storage + pBuf->curLen, 1, count, in);
    if (actual != count) {
        if (eofExpected && feof(in) && !ferror(in)) {
            /* return without reporting an error */
        } else {
            fprintf(stderr, "ERROR: read %d of %d bytes\n", actual, count);
            return -1;
        }
    }
    pBuf->curLen += count;
    assert(pBuf->curLen <= pBuf->maxLen);
    return 0;
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32409289

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档