syscall sys_process_vm_readv nr 310 nbargs 6 types: (pid_t, const struct iovec *, unsigned long, const struct iovec *, unsigned long, unsigned long) args: (pid, lvec, liovcnt, rvec, riovcnt, flags)
syscall sys_process_vm_writev nr 311 nbargs 6 types: (pid_t, const struct iovec *, unsigned long, const struct iovec *, unsigned long, unsigned long) args: (pid, lvec, liovcnt, rvec, riovcnt, flags)
syscall sys_finit_module nr 313 nbargs 3 types: (int, const char *, int) args: (fd, uargs, flags)
-SUCCESS
2) Generate system call TRACE_EVENT().
-Take the dmesg metadata and feed it to lttng-syscalls-generate-headers.sh, e.g.,
-from the instrumentation/syscalls directory. See the script header for
-usage example. It should be run for both the integers and pointers types.
+Take the dmesg metadata and feed it to lttng-syscalls-generate-headers.sh
+(do not include the ending SUCCESS line), e.g., from the
+instrumentation/syscalls directory. See the script header for usage example.
+It should be run for both the integers and pointers types.
After these are created, we just need to follow the new system call additions,
no need to regenerate the whole thing, since system calls are only appended to.
+
+3) Override headers
+
+You need to provide override headers (even if they don't contain
+overrides) for each architecture. Those are meant to contain manual
+overrides for specific system calls for cases where the script do not
+generate the correct typing for specific system calls.
+
+4) Integrating the new architecture, updating architecture header
+
+Edit instrumentation/syscalls/headers/syscalls_integers.h and
+syscalls_pointers.h. Add the new architecture
+(e.g. CONFIG_X86_64) to the newly-generated headers
+(e.g. changing the current x86-64-syscalls-3.10.0-rc7_<CLASS>.h into
+x86-64-syscalls-3.13.7_<CLASS>.h), then rebuild lttng-modules.
TMPFILE=gen.tmp.1
HEADER=headers/${INPUTFILE}_${CLASS}.h
+if [ x"$INPUTDIR" = x"" ]; then
+ echo "Error: Please specify input directory as second argument"
+ exit 1
+fi
+
+if [ x"$INPUTFILE" = x"" ]; then
+ echo "Error: Please specify input file as third argument"
+ exit 1
+fi
+
+if [ x"$BITNESS" != x"32" ] && [ x"$BITNESS" != x"64" ]; then
+ echo "Error: Please specify bitness as fourth argument (\"32\" or \"64\")"
+ exit 1
+fi
+
cp ${INPUT} ${SRCFILE}
#Cleanup
mv ${TMPFILE} ${SRCFILE}
fi
+if [ x"$CLASSCAP" = x"" ]; then
+ echo "Error: Please specify \"integers\" or \"pointers\" as first argument"
+ rm -f ${SRCFILE}
+ exit 1
+fi
+
echo "/* THIS FILE IS AUTO-GENERATED. DO NOT EDIT */" > ${HEADER}
echo \
' TP_STRUCT__entry(),\n'\
' TP_fast_assign(),\n'\
' TP_printk()\n'\
-')'\
+')\n'\
>> ${HEADER}
grep "^syscall [^ ]* nr [^ ]* nbargs ${NRARGS} " ${SRCFILE} > ${TMPFILE}
# Macro for tracing syscall table
-rm -f ${TMPFILE}
-for NRARGS in $(seq 0 6); do
- grep "^syscall [^ ]* nr [^ ]* nbargs ${NRARGS} " ${SRCFILE} >> ${TMPFILE}
-done
-
echo \
"
#endif /* _TRACE_SYSCALLS_${CLASSCAP}_H */