Bug 15138 - information on memory of summaryRprof(memory = "both") is incorrect
information on memory of summaryRprof(memory = "both") is incorrect
Status: CLOSED FIXED
Product: R
Classification: Unclassified
Component: Misc
R 2.15.2
x86_64/x64/amd64 (64-bit) Mac OS X v10.6
: P5 minor
Assigned To: R-core
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-15 03:13 UTC by ARABIKI Takeshi
Modified: 2012-12-17 12:35 UTC (History)
0 users

See Also:


Attachments
Rprof outputs the values of R_SmallVallocSize * vsfac (bytes), R_LargeVallocSize * vsfac (bytes) and R_NodesInUse * sizeof(SEXPREC) (bytes) (447 bytes, application/octet-stream)
2012-12-15 03:13 UTC, ARABIKI Takeshi
Details
summaryRprof converts the unit of R_SmallVallocSize andR_LargeVallocSize to bytes (626 bytes, patch)
2012-12-15 03:16 UTC, ARABIKI Takeshi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ARABIKI Takeshi 2012-12-15 03:13:59 UTC
Created attachment 1396 [details]
Rprof outputs the values of R_SmallVallocSize * vsfac (bytes), R_LargeVallocSize * vsfac (bytes) and R_NodesInUse * sizeof(SEXPREC) (bytes)

Rprof outputs the values of R_SmallVallocSize (bytes/bytes), R_LargeVallocSize (bytes/bytes) and R_NodesInUse * sizeof(SEXPREC) (bytes) in R 2.15.2.
However, summaryRprof uses the summation of these values without converting the unit of R_SmallVallocSize and R_LargeVallocSize to bytes,
so the information on memory of summaryRprof(memory = "both") is incorrect.

There are two solutions:
One is that Rprof outputs the values of R_SmallVallocSize * vsfac (bytes), R_LargeVallocSize * vsfac (bytes) and R_NodesInUse * sizeof(SEXPREC) (bytes).

Another is that summaryRprof converts the unit of R_SmallVallocSize and R_LargeVallocSize to bytes.

I prefer the latter because we can use Rprof.out output in R 2.15.2 or before. 

I attached patches for two solutions.
Comment 1 ARABIKI Takeshi 2012-12-15 03:16:18 UTC
Created attachment 1397 [details]
summaryRprof converts the unit of R_SmallVallocSize andR_LargeVallocSize to bytes