mirror of https://github.com/xemu-project/xemu.git
trace: [configure] rename CONFIG_*_TRACE into CONFIG_TRACE_*
Provides a more hierarchical view of the variable domain. Also adds the CONFIG_TRACE_* variables for all backends. [Stefan added missing 'test' in stap if statement] Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
This commit is contained in:
parent
51010317dd
commit
6d8a764e0f
|
@ -44,7 +44,7 @@ endif
|
||||||
config-target.h: config-target.h-timestamp
|
config-target.h: config-target.h-timestamp
|
||||||
config-target.h-timestamp: config-target.mak
|
config-target.h-timestamp: config-target.mak
|
||||||
|
|
||||||
ifdef CONFIG_SYSTEMTAP_TRACE
|
ifdef CONFIG_TRACE_SYSTEMTAP
|
||||||
stap: $(QEMU_PROG).stp
|
stap: $(QEMU_PROG).stp
|
||||||
|
|
||||||
ifdef CONFIG_USER_ONLY
|
ifdef CONFIG_USER_ONLY
|
||||||
|
@ -414,7 +414,7 @@ clean:
|
||||||
rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o
|
rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o
|
||||||
rm -f *.d */*.d tcg/*.o ide/*.o 9pfs/*.o
|
rm -f *.d */*.d tcg/*.o ide/*.o 9pfs/*.o
|
||||||
rm -f hmp-commands.h qmp-commands.h gdbstub-xml.c
|
rm -f hmp-commands.h qmp-commands.h gdbstub-xml.c
|
||||||
ifdef CONFIG_SYSTEMTAP_TRACE
|
ifdef CONFIG_TRACE_SYSTEMTAP
|
||||||
rm -f *.stp
|
rm -f *.stp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -425,7 +425,7 @@ ifneq ($(STRIP),)
|
||||||
$(STRIP) $(patsubst %,"$(DESTDIR)$(bindir)/%",$(PROGS))
|
$(STRIP) $(patsubst %,"$(DESTDIR)$(bindir)/%",$(PROGS))
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifdef CONFIG_SYSTEMTAP_TRACE
|
ifdef CONFIG_TRACE_SYSTEMTAP
|
||||||
$(INSTALL_DIR) "$(DESTDIR)$(datadir)/../systemtap/tapset"
|
$(INSTALL_DIR) "$(DESTDIR)$(datadir)/../systemtap/tapset"
|
||||||
$(INSTALL_DATA) $(QEMU_PROG).stp "$(DESTDIR)$(datadir)/../systemtap/tapset"
|
$(INSTALL_DATA) $(QEMU_PROG).stp "$(DESTDIR)$(datadir)/../systemtap/tapset"
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -3065,15 +3065,25 @@ bsd)
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo "TRACE_BACKEND=$trace_backend" >> $config_host_mak
|
echo "TRACE_BACKEND=$trace_backend" >> $config_host_mak
|
||||||
if test "$trace_backend" = "simple"; then
|
if test "$trace_backend" = "nop"; then
|
||||||
echo "CONFIG_SIMPLE_TRACE=y" >> $config_host_mak
|
echo "CONFIG_TRACE_NOP=y" >> $config_host_mak
|
||||||
fi
|
fi
|
||||||
# Set the appropriate trace file.
|
|
||||||
if test "$trace_backend" = "simple"; then
|
if test "$trace_backend" = "simple"; then
|
||||||
|
echo "CONFIG_TRACE_SIMPLE=y" >> $config_host_mak
|
||||||
|
# Set the appropriate trace file.
|
||||||
trace_file="\"$trace_file-\" FMT_pid"
|
trace_file="\"$trace_file-\" FMT_pid"
|
||||||
fi
|
fi
|
||||||
if test "$trace_backend" = "dtrace" -a "$trace_backend_stap" = "yes" ; then
|
if test "$trace_backend" = "stderr"; then
|
||||||
echo "CONFIG_SYSTEMTAP_TRACE=y" >> $config_host_mak
|
echo "CONFIG_TRACE_STDERR=y" >> $config_host_mak
|
||||||
|
fi
|
||||||
|
if test "$trace_backend" = "ust"; then
|
||||||
|
echo "CONFIG_TRACE_UST=y" >> $config_host_mak
|
||||||
|
fi
|
||||||
|
if test "$trace_backend" = "dtrace"; then
|
||||||
|
echo "CONFIG_TRACE_DTRACE=y" >> $config_host_mak
|
||||||
|
if test "$trace_backend_stap" = "yes" ; then
|
||||||
|
echo "CONFIG_TRACE_SYSTEMTAP=y" >> $config_host_mak
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
echo "CONFIG_TRACE_FILE=$trace_file" >> $config_host_mak
|
echo "CONFIG_TRACE_FILE=$trace_file" >> $config_host_mak
|
||||||
|
|
||||||
|
|
|
@ -180,7 +180,7 @@ STEXI
|
||||||
Output logs to @var{filename}.
|
Output logs to @var{filename}.
|
||||||
ETEXI
|
ETEXI
|
||||||
|
|
||||||
#ifdef CONFIG_SIMPLE_TRACE
|
#ifdef CONFIG_TRACE_SIMPLE
|
||||||
{
|
{
|
||||||
.name = "trace-event",
|
.name = "trace-event",
|
||||||
.args_type = "name:s,option:b",
|
.args_type = "name:s,option:b",
|
||||||
|
@ -1354,7 +1354,7 @@ show roms
|
||||||
@end table
|
@end table
|
||||||
ETEXI
|
ETEXI
|
||||||
|
|
||||||
#ifdef CONFIG_SIMPLE_TRACE
|
#ifdef CONFIG_TRACE_SIMPLE
|
||||||
STEXI
|
STEXI
|
||||||
@item info trace
|
@item info trace
|
||||||
show contents of trace buffer
|
show contents of trace buffer
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
#include "json-parser.h"
|
#include "json-parser.h"
|
||||||
#include "osdep.h"
|
#include "osdep.h"
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
#ifdef CONFIG_SIMPLE_TRACE
|
#ifdef CONFIG_TRACE_SIMPLE
|
||||||
#include "trace.h"
|
#include "trace.h"
|
||||||
#endif
|
#endif
|
||||||
#include "ui/qemu-spice.h"
|
#include "ui/qemu-spice.h"
|
||||||
|
@ -592,7 +592,7 @@ static void do_help_cmd(Monitor *mon, const QDict *qdict)
|
||||||
help_cmd(mon, qdict_get_try_str(qdict, "name"));
|
help_cmd(mon, qdict_get_try_str(qdict, "name"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_SIMPLE_TRACE
|
#ifdef CONFIG_TRACE_SIMPLE
|
||||||
static void do_change_trace_event_state(Monitor *mon, const QDict *qdict)
|
static void do_change_trace_event_state(Monitor *mon, const QDict *qdict)
|
||||||
{
|
{
|
||||||
const char *tp_name = qdict_get_str(qdict, "name");
|
const char *tp_name = qdict_get_str(qdict, "name");
|
||||||
|
@ -996,7 +996,7 @@ static void do_info_cpu_stats(Monitor *mon)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_SIMPLE_TRACE)
|
#if defined(CONFIG_TRACE_SIMPLE)
|
||||||
static void do_info_trace(Monitor *mon)
|
static void do_info_trace(Monitor *mon)
|
||||||
{
|
{
|
||||||
st_print_trace((FILE *)mon, &monitor_fprintf);
|
st_print_trace((FILE *)mon, &monitor_fprintf);
|
||||||
|
@ -3135,7 +3135,7 @@ static const mon_cmd_t info_cmds[] = {
|
||||||
.help = "show roms",
|
.help = "show roms",
|
||||||
.mhandler.info = do_info_roms,
|
.mhandler.info = do_info_roms,
|
||||||
},
|
},
|
||||||
#if defined(CONFIG_SIMPLE_TRACE)
|
#if defined(CONFIG_TRACE_SIMPLE)
|
||||||
{
|
{
|
||||||
.name = "trace",
|
.name = "trace",
|
||||||
.args_type = "",
|
.args_type = "",
|
||||||
|
|
|
@ -303,7 +303,7 @@ static QemuOptsList qemu_mon_opts = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_SIMPLE_TRACE
|
#ifdef CONFIG_TRACE_SIMPLE
|
||||||
static QemuOptsList qemu_trace_opts = {
|
static QemuOptsList qemu_trace_opts = {
|
||||||
.name = "trace",
|
.name = "trace",
|
||||||
.implied_opt_name = "trace",
|
.implied_opt_name = "trace",
|
||||||
|
@ -517,7 +517,7 @@ static QemuOptsList *vm_config_groups[32] = {
|
||||||
&qemu_global_opts,
|
&qemu_global_opts,
|
||||||
&qemu_mon_opts,
|
&qemu_mon_opts,
|
||||||
&qemu_cpudef_opts,
|
&qemu_cpudef_opts,
|
||||||
#ifdef CONFIG_SIMPLE_TRACE
|
#ifdef CONFIG_TRACE_SIMPLE
|
||||||
&qemu_trace_opts,
|
&qemu_trace_opts,
|
||||||
#endif
|
#endif
|
||||||
&qemu_option_rom_opts,
|
&qemu_option_rom_opts,
|
||||||
|
|
|
@ -2436,7 +2436,7 @@ Normally QEMU loads a configuration file from @var{sysconfdir}/qemu.conf and
|
||||||
@var{sysconfdir}/target-@var{ARCH}.conf on startup. The @code{-nodefconfig}
|
@var{sysconfdir}/target-@var{ARCH}.conf on startup. The @code{-nodefconfig}
|
||||||
option will prevent QEMU from loading these configuration files at startup.
|
option will prevent QEMU from loading these configuration files at startup.
|
||||||
ETEXI
|
ETEXI
|
||||||
#ifdef CONFIG_SIMPLE_TRACE
|
#ifdef CONFIG_TRACE_SIMPLE
|
||||||
DEF("trace", HAS_ARG, QEMU_OPTION_trace,
|
DEF("trace", HAS_ARG, QEMU_OPTION_trace,
|
||||||
"-trace\n"
|
"-trace\n"
|
||||||
" Specify a trace file to log traces to\n",
|
" Specify a trace file to log traces to\n",
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#ifdef CONFIG_SIMPLE_TRACE
|
#ifdef CONFIG_TRACE_SIMPLE
|
||||||
typedef uint64_t TraceEventID;
|
typedef uint64_t TraceEventID;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -43,6 +43,6 @@ static inline bool st_init(const char *file)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif /* !CONFIG_SIMPLE_TRACE */
|
#endif /* !CONFIG_TRACE_SIMPLE */
|
||||||
|
|
||||||
#endif /* SIMPLETRACE_H */
|
#endif /* SIMPLETRACE_H */
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include "../cutils.c"
|
#include "../cutils.c"
|
||||||
#include "../path.c"
|
#include "../path.c"
|
||||||
#include "../trace.c"
|
#include "../trace.c"
|
||||||
#ifdef CONFIG_SIMPLE_TRACE
|
#ifdef CONFIG_TRACE_SIMPLE
|
||||||
#include "../simpletrace.c"
|
#include "../simpletrace.c"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
2
vl.c
2
vl.c
|
@ -2928,7 +2928,7 @@ int main(int argc, char **argv, char **envp)
|
||||||
}
|
}
|
||||||
xen_mode = XEN_ATTACH;
|
xen_mode = XEN_ATTACH;
|
||||||
break;
|
break;
|
||||||
#ifdef CONFIG_SIMPLE_TRACE
|
#ifdef CONFIG_TRACE_SIMPLE
|
||||||
case QEMU_OPTION_trace:
|
case QEMU_OPTION_trace:
|
||||||
opts = qemu_opts_parse(qemu_find_opts("trace"), optarg, 0);
|
opts = qemu_opts_parse(qemu_find_opts("trace"), optarg, 0);
|
||||||
if (opts) {
|
if (opts) {
|
||||||
|
|
Loading…
Reference in New Issue