|
|
|
@ -32,8 +32,10 @@ compile_flags = [
|
|
|
|
|
['BASE', 'Empty application size'],
|
|
|
|
|
['', 'Subtotal: empty application size on this platform'],
|
|
|
|
|
|
|
|
|
|
['HAS_PJLIB', 'PJLIB (pool, data structures, hash tables, ioqueue, socket, timer heap, etc.)'],
|
|
|
|
|
['', 'Subtotal: Minimal PJLIB application size'],
|
|
|
|
|
['HAS_PJLIB', 'PJLIB (pool, data structures, hash tables, ioqueue, socket, timer heap, etc.). ' +
|
|
|
|
|
'For targets that statically link application with LIBC, the size includes ' +
|
|
|
|
|
'various LIBC functions that are used by PJLIB.'],
|
|
|
|
|
['', 'Subtotal: Application linked with PJLIB'],
|
|
|
|
|
|
|
|
|
|
# PJLIB-UTIL
|
|
|
|
|
['HAS_PJLIB_STUN', 'PJLIB-UTIL STUN client'],
|
|
|
|
@ -46,7 +48,7 @@ compile_flags = [
|
|
|
|
|
['HAS_PJSIP_CORE', 'PJSIP Core - Endpoint (transport management, module management, event distribution, etc.)'],
|
|
|
|
|
['HAS_PJSIP_CORE_MSG_UTIL', 'PJSIP Core - Stateless operations, server resolution and fail-over'],
|
|
|
|
|
['HAS_PJSIP_UDP_TRANSPORT', 'PJSIP UDP transport'],
|
|
|
|
|
['', 'Subtotal: A very minimum SIP application (parsing, UDP transport+STUN, no transaction)'],
|
|
|
|
|
['', 'Subtotal: A minimalistic SIP application (parsing, UDP transport+STUN, no transaction)'],
|
|
|
|
|
|
|
|
|
|
['HAS_PJSIP_TCP_TRANSPORT', 'PJSIP TCP transport'],
|
|
|
|
|
['HAS_PJSIP_INFO', 'PJSIP INFO support (RFC 2976) (no special treatment, thus the zero size)'],
|
|
|
|
@ -157,8 +159,7 @@ def print_text_report(filename):
|
|
|
|
|
#
|
|
|
|
|
# Write the report to HTML file
|
|
|
|
|
#
|
|
|
|
|
def print_html_report(filename):
|
|
|
|
|
output = open(filename, 'w')
|
|
|
|
|
def print_html_report():
|
|
|
|
|
|
|
|
|
|
# Get Revision info.
|
|
|
|
|
f = os.popen('svn info | grep Revision')
|
|
|
|
@ -171,16 +172,21 @@ def print_html_report(filename):
|
|
|
|
|
o = names[1]
|
|
|
|
|
cc = names[2]
|
|
|
|
|
cc_ver = names[3]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Open HTML file
|
|
|
|
|
filename = 'footprint-' + m + '-' + o + '.htm'
|
|
|
|
|
output = open(filename, 'w')
|
|
|
|
|
|
|
|
|
|
title = 'PJSIP and PJMEDIA footprint report for ' + m + '-' + o + ' target'
|
|
|
|
|
output.write('<HTML><HEAD>\n');
|
|
|
|
|
output.write(' <TITLE>PJSIP and PJMEDIA footprint report for ' + o + '/' + m + ' (r' + revision + ')</TITLE>\n')
|
|
|
|
|
output.write(' <TITLE>' + title + '</TITLE>\n')
|
|
|
|
|
output.write(' <LINK href="/style/style.css" type="text/css" rel="stylesheet">\n')
|
|
|
|
|
output.write('</HEAD>\n');
|
|
|
|
|
output.write('<BODY bgcolor="white">\n');
|
|
|
|
|
output.write('<!--#include virtual="/header.html" -->')
|
|
|
|
|
|
|
|
|
|
output.write(' <H1>PJSIP and PJMEDIA footprint report (r' + revision + ')</H1>\n')
|
|
|
|
|
output.write('Auto-generated by pjsip-apps/build/get-footprint.py\n')
|
|
|
|
|
output.write(' <H1>' + title + '</H1>\n')
|
|
|
|
|
output.write('Auto-generated by pjsip-apps/build/get-footprint.py script\n')
|
|
|
|
|
output.write('<p>Date: ' + time.asctime() + '<BR>\n')
|
|
|
|
|
output.write('Revision: r' + revision + '</p>\n\n')
|
|
|
|
|
output.write('<HR>\n')
|
|
|
|
@ -242,11 +248,18 @@ def print_html_report(filename):
|
|
|
|
|
output.write( ' <TD align="right">' + `string.atoi(e[4]) - string.atoi(prev[4])` + '</TD>\n' )
|
|
|
|
|
output.write( ' <TD>' + e[5] + '</TD>\n')
|
|
|
|
|
else:
|
|
|
|
|
empty_size = exe_size[1]
|
|
|
|
|
output.write('<TR bgcolor="#e8e8ff">\n')
|
|
|
|
|
output.write( ' <TD align="right"> </TD>\n')
|
|
|
|
|
output.write( ' <TD align="right"> </TD>\n')
|
|
|
|
|
output.write( ' <TD align="right"> </TD>\n')
|
|
|
|
|
output.write( ' <TD><strong>' + e[5] + ': .text=' + e[2]+ ', .data=' + e[3] + ', .bss=' + e[4] + '</strong></TD>\n')
|
|
|
|
|
output.write( ' <TD><strong>' + e[5] + ': .text=' + e[2]+ ', .data=' + e[3] + ', .bss=' + e[4] )
|
|
|
|
|
output.write( '\n </strong> <BR>(Size minus empty application size: ' + \
|
|
|
|
|
'.text=' + `string.atoi(e[2]) - string.atoi(empty_size[2])` + \
|
|
|
|
|
', .data=' + `string.atoi(e[3]) - string.atoi(empty_size[3])` + \
|
|
|
|
|
', .data=' + `string.atoi(e[4]) - string.atoi(empty_size[4])` + \
|
|
|
|
|
')\n' )
|
|
|
|
|
output.write( ' </TD>\n')
|
|
|
|
|
|
|
|
|
|
output.write('</TR>\n')
|
|
|
|
|
|
|
|
|
@ -306,6 +319,6 @@ for elem in compile_flags:
|
|
|
|
|
exe_size.append(n)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print_text_report('footprint.txt')
|
|
|
|
|
print_html_report('footprint.htm')
|
|
|
|
|
#print_text_report('footprint.txt')
|
|
|
|
|
print_html_report()
|
|
|
|
|
|
|
|
|
|