m4/*.m4 \
project/.post* \
src/*.c src/*.c.T src/*.sh \
- test/*.cpp test/*.cpp.T \
+ test/*.c test/*.cpp test/*.cpp.T \
LICENSE Makefile
SOURCES_EXEC=src/*.sh
cd coverage && $(MAKE) -f ../Makefile top_srcdir=../../ COVERAGE_FLAGS="-fprofile-arcs -ftest-coverage" check
cd coverage && for i in ${OBJS}; do gcov -o .libs/ $$i ; done
+padding: padding.o
+ ${LINK} $< -o $@
+
cjobid.c strmd5.c:
if [ ! -d ${jobiddir} ]; then echo "Directory ${jobiddir} not found"; exit 1; fi
mkdir -p glite/jobid
${STAGE_PERFTEST} ;
clean:
- rm -rvf *.o *.lo .libs lib* *.c *.h *.dox C/ CPP/ test_parse il_test parse.cpp events.tex status.tex test_query_rec
+ rm -rvf *.o *.lo .libs lib* *.c *.h *.dox C/ CPP/
+ rm -fv test_parse il_test parse.cpp events.tex status.tex test_query_rec padding
rm -rvf ${REPORTS}
rm -rvf dist ${package}-*.tar.gz
/* !!! if adding something malloc-able, update edg_wll_FreeContext too !!! */
-glite_lb_padded_struct(_edg_wll_Context,150,
+glite_lb_padded_struct(_edg_wll_Context,200,
/// XXX: branch value: glite_lb_padded_struct(_edg_wll_Context,120,
/* Error handling */
int errCode; /* recent error code */
* \union edg_wll_Event
* \brief All event types union
*/
-glite_lb_padded_union(_edg_wll_Event,30,
+glite_lb_padded_union(_edg_wll_Event,32,
edg_wll_EventCode type; /* it is probably never used */
edg_wll_AnyEvent any;
@@@{
--- /dev/null
+#define CC /*
+gcc -W -Wall -g -O2 padding.c -o padding -I../../stage/usr/include
+exit $?
+*/
+
+/*
+ * quick analysis of padding usage
+ */
+
+#include <stdio.h>
+
+#include "glite/lb/connpool.h"
+#include "glite/lb/context-int.h"
+#include "glite/lb/events.h"
+#include "glite/lb/lb_plain_io.h"
+
+
+void out(const char *name, size_t size, size_t padding) {
+ printf("%s:\n", name);
+ printf(" sizeof %lu padding %lu padno %d use %0.02f %%\n", size, padding, size/(sizeof(void *)), (double)(size - padding)/size*100);
+ printf("\n");
+}
+
+
+int main() {
+ struct _edg_wll_ConnPool connpool;
+ struct _edg_wll_ConnProxy connproxy;
+ struct _edg_wll_Context context;
+ union _edg_wll_Event event;
+ struct _edg_wll_PlainConnection plainconnection;
+
+ out("struct _edg_wll_ConnPool", sizeof(connpool), sizeof(connpool._padding));
+ out("struct _edg_wll_ConnProxy", sizeof(connproxy), sizeof(connproxy._padding));
+ out("struct _edg_wll_Context", sizeof(context), sizeof(context._padding));
+ out("union _edg_wll_Event", sizeof(event), sizeof(event._pad) - sizeof(union _edg_wll_Event_to_pad__dont_use));
+ out("struct _edg_wll_PlainConnection", sizeof(plainconnection), sizeof(plainconnection._padding));
+
+ return 0;
+}