From 3f1e092ed414ab2a9f73eafe87f35e868030463c Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Wed, 31 Mar 2010 05:32:43 -0400 Subject: trace-view: Added saving of filters Add "Save filters" to "File" menu, where it will allow the user to save the filters to a file in XML format. Signed-off-by: Steven Rostedt --- trace-xml.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 trace-xml.h (limited to 'trace-xml.h') diff --git a/trace-xml.h b/trace-xml.h new file mode 100644 index 0000000..41f6193 --- /dev/null +++ b/trace-xml.h @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt + * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License (not later!) + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + */ +#ifndef __TRACE_XML_H +#define __TRACE_XML_H + +struct tracecmd_xml_handle; + +struct tracecmd_xml_handle *tracecmd_xml_create(const char *name); +void tracecmd_xml_close(struct tracecmd_xml_handle *handle); + +int tracecmd_xml_start_system(struct tracecmd_xml_handle *handle, + const char *system, const char *version); +void tracecmd_xml_end_system(struct tracecmd_xml_handle *handle); + +int tracecmd_xml_start_sub_system(struct tracecmd_xml_handle *handle, + const char *subsystem); +void tracecmd_xml_end_sub_system(struct tracecmd_xml_handle *handle); + +int tracecmd_xml_write_element(struct tracecmd_xml_handle *handle, + const char *obj, + const char *fmt, ...); + +#endif /* __TRACE_XML_H */ -- cgit v1.2.2 From b2a9cd2f38f6c3c30e9ef4c47eb004b41b50fe5e Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Mon, 5 Apr 2010 12:40:51 -0400 Subject: trace-view: Add loading of saved event filters Add "Load filters" to trace-view that loads the event filters saved with a "Save filters". Signed-off-by: Steven Rostedt --- trace-xml.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'trace-xml.h') diff --git a/trace-xml.h b/trace-xml.h index 41f6193..4006538 100644 --- a/trace-xml.h +++ b/trace-xml.h @@ -22,8 +22,11 @@ #define __TRACE_XML_H struct tracecmd_xml_handle; +struct tacecmd_xml_system; +struct tacecmd_xml_system_node; struct tracecmd_xml_handle *tracecmd_xml_create(const char *name); +struct tracecmd_xml_handle *tracecmd_xml_open(const char *name); void tracecmd_xml_close(struct tracecmd_xml_handle *handle); int tracecmd_xml_start_system(struct tracecmd_xml_handle *handle, @@ -38,4 +41,20 @@ int tracecmd_xml_write_element(struct tracecmd_xml_handle *handle, const char *obj, const char *fmt, ...); +struct tracecmd_xml_handle *tracecmd_xml_open(const char *file); + +struct tracecmd_xml_system * +tracecmd_xml_find_system(struct tracecmd_xml_handle *handle, + const char *system); +void tracecmd_xml_free_system(struct tracecmd_xml_system *system); +struct tracecmd_xml_system_node * +tracecmd_xml_system_node(struct tracecmd_xml_system *system); +const char *tracecmd_xml_node_type(struct tracecmd_xml_system_node *tnode); +struct tracecmd_xml_system_node * +tracecmd_xml_node_child(struct tracecmd_xml_system_node *tnode); +struct tracecmd_xml_system_node * +tracecmd_xml_node_next(struct tracecmd_xml_system_node *tnode); +const char *tracecmd_xml_node_value(struct tracecmd_xml_handle *handle, + struct tracecmd_xml_system_node *tnode); + #endif /* __TRACE_XML_H */ -- cgit v1.2.2 From 20359fdc358744dee36b8e59c234e965fc7d2a69 Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Mon, 5 Apr 2010 22:40:54 -0400 Subject: kernelshark: Make all saved filters under KernelShark Make the xml doc under ... for trace-view and trace-graph. Also pull out the task filters since the view and graph in kernelshark share the same filters. Signed-off-by: Steven Rostedt --- trace-xml.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'trace-xml.h') diff --git a/trace-xml.h b/trace-xml.h index 4006538..f84907d 100644 --- a/trace-xml.h +++ b/trace-xml.h @@ -25,12 +25,12 @@ struct tracecmd_xml_handle; struct tacecmd_xml_system; struct tacecmd_xml_system_node; -struct tracecmd_xml_handle *tracecmd_xml_create(const char *name); +struct tracecmd_xml_handle *tracecmd_xml_create(const char *name, const char *version); struct tracecmd_xml_handle *tracecmd_xml_open(const char *name); void tracecmd_xml_close(struct tracecmd_xml_handle *handle); int tracecmd_xml_start_system(struct tracecmd_xml_handle *handle, - const char *system, const char *version); + const char *system); void tracecmd_xml_end_system(struct tracecmd_xml_handle *handle); int tracecmd_xml_start_sub_system(struct tracecmd_xml_handle *handle, -- cgit v1.2.2 From ce6dcdc247fc6194566360e74fcb986fa656043a Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Thu, 10 Jun 2010 16:15:19 -0400 Subject: kernelshark: Fix the xml save/load to handle separate task filters Update the save/load of the filters to handle the change to make the List and Graph have separate task filters. Signed-off-by: Steven Rostedt --- trace-xml.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'trace-xml.h') diff --git a/trace-xml.h b/trace-xml.h index f84907d..d1f62b0 100644 --- a/trace-xml.h +++ b/trace-xml.h @@ -56,5 +56,7 @@ struct tracecmd_xml_system_node * tracecmd_xml_node_next(struct tracecmd_xml_system_node *tnode); const char *tracecmd_xml_node_value(struct tracecmd_xml_handle *handle, struct tracecmd_xml_system_node *tnode); +int tracecmd_xml_system_exists(struct tracecmd_xml_handle *handle, + const char *system); #endif /* __TRACE_XML_H */ -- cgit v1.2.2