~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/perf/util/db-export.h

Version: ~ [ linux-6.0-rc1 ] ~ [ linux-5.19.1 ] ~ [ linux-5.18.17 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.60 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.136 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.210 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.255 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.290 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.325 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.302 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * db-export.h: Support for exporting data suitable for import to a database
  3  * Copyright (c) 2014, Intel Corporation.
  4  *
  5  * This program is free software; you can redistribute it and/or modify it
  6  * under the terms and conditions of the GNU General Public License,
  7  * version 2, as published by the Free Software Foundation.
  8  *
  9  * This program is distributed in the hope it will be useful, but WITHOUT
 10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 12  * more details.
 13  *
 14  */
 15 
 16 #ifndef __PERF_DB_EXPORT_H
 17 #define __PERF_DB_EXPORT_H
 18 
 19 #include <linux/types.h>
 20 #include <linux/list.h>
 21 
 22 struct perf_evsel;
 23 struct machine;
 24 struct thread;
 25 struct comm;
 26 struct dso;
 27 struct perf_sample;
 28 struct addr_location;
 29 struct call_return_processor;
 30 struct call_path;
 31 struct call_return;
 32 
 33 struct export_sample {
 34         union perf_event        *event;
 35         struct perf_sample      *sample;
 36         struct perf_evsel       *evsel;
 37         struct addr_location    *al;
 38         u64                     db_id;
 39         u64                     comm_db_id;
 40         u64                     dso_db_id;
 41         u64                     sym_db_id;
 42         u64                     offset; /* ip offset from symbol start */
 43         u64                     addr_dso_db_id;
 44         u64                     addr_sym_db_id;
 45         u64                     addr_offset; /* addr offset from symbol start */
 46 };
 47 
 48 struct db_export {
 49         int (*export_evsel)(struct db_export *dbe, struct perf_evsel *evsel);
 50         int (*export_machine)(struct db_export *dbe, struct machine *machine);
 51         int (*export_thread)(struct db_export *dbe, struct thread *thread,
 52                              u64 main_thread_db_id, struct machine *machine);
 53         int (*export_comm)(struct db_export *dbe, struct comm *comm);
 54         int (*export_comm_thread)(struct db_export *dbe, u64 db_id,
 55                                   struct comm *comm, struct thread *thread);
 56         int (*export_dso)(struct db_export *dbe, struct dso *dso,
 57                           struct machine *machine);
 58         int (*export_symbol)(struct db_export *dbe, struct symbol *sym,
 59                              struct dso *dso);
 60         int (*export_branch_type)(struct db_export *dbe, u32 branch_type,
 61                                   const char *name);
 62         int (*export_sample)(struct db_export *dbe, struct export_sample *es);
 63         int (*export_call_path)(struct db_export *dbe, struct call_path *cp);
 64         int (*export_call_return)(struct db_export *dbe,
 65                                   struct call_return *cr);
 66         struct call_return_processor *crp;
 67         u64 evsel_last_db_id;
 68         u64 machine_last_db_id;
 69         u64 thread_last_db_id;
 70         u64 comm_last_db_id;
 71         u64 comm_thread_last_db_id;
 72         u64 dso_last_db_id;
 73         u64 symbol_last_db_id;
 74         u64 sample_last_db_id;
 75         u64 call_path_last_db_id;
 76         u64 call_return_last_db_id;
 77         struct list_head deferred;
 78 };
 79 
 80 int db_export__init(struct db_export *dbe);
 81 int db_export__flush(struct db_export *dbe);
 82 void db_export__exit(struct db_export *dbe);
 83 int db_export__evsel(struct db_export *dbe, struct perf_evsel *evsel);
 84 int db_export__machine(struct db_export *dbe, struct machine *machine);
 85 int db_export__thread(struct db_export *dbe, struct thread *thread,
 86                       struct machine *machine, struct comm *comm);
 87 int db_export__comm(struct db_export *dbe, struct comm *comm,
 88                     struct thread *main_thread);
 89 int db_export__comm_thread(struct db_export *dbe, struct comm *comm,
 90                            struct thread *thread);
 91 int db_export__dso(struct db_export *dbe, struct dso *dso,
 92                    struct machine *machine);
 93 int db_export__symbol(struct db_export *dbe, struct symbol *sym,
 94                       struct dso *dso);
 95 int db_export__branch_type(struct db_export *dbe, u32 branch_type,
 96                            const char *name);
 97 int db_export__sample(struct db_export *dbe, union perf_event *event,
 98                       struct perf_sample *sample, struct perf_evsel *evsel,
 99                       struct addr_location *al);
100 
101 int db_export__branch_types(struct db_export *dbe);
102 
103 int db_export__call_path(struct db_export *dbe, struct call_path *cp);
104 int db_export__call_return(struct db_export *dbe, struct call_return *cr);
105 
106 #endif
107 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp