wiki:Doc/compiler/scripts/Memory

PANC−MEMORY.PL

NAME
SYNOPSIS
DESCRIPTION
EXAMPLE
AUTHOR

NAME

panc-memory.pl − create a report of panc memory utilization

SYNOPSIS

panc−memory.pl [−−help] {logfile}

DESCRIPTION

The panc−memory.pl script will analyze a panc log file and report on the memory usage. The script takes the name of the log file as its only argument. If no argument is given or the −−help option is used, a short usage message is printed. The log file must have been created with "memory" logging enabled.

The script will extract the heap memory usage of the compiler as a function of time. The memory use is reported in megabytes and the times are in milliseconds. Usually one will want to use this information in conjunction with the thread information to understand the memory use as it relates to general compiler activity. Note that java uses sophisticated memory management and garbage collection techniques; fluctuations in memory usage may not be directly related to the compiler activity at any instant in time.

EXAMPLE

If the output from the command is written to the file memory.txt, then the following R script will create a plot of the memory utilization as a function of time.

# R−script for simple analysis of memory report
mstats <−  read.table("memory.txt")
attach(mstats)
plot(time/1000, memory, xlab="time (s)", ylab="memory (MB)", type="l")
detach(mstats)

AUTHOR

Charles Loomis

Last modified 16 years ago Last modified on Oct 3, 2008, 4:16:41 PM