mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
perf srccode: Move struct definition from map.h to srccode.h
To reduce the header dependencies, since we already have a srccode.h header, then there is where the 'struct srccode_state' should be, and map.h, that is more widely used should have just a forward declaraion of 'struct srccode_state'. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-64lrkjjaa7wlo1zi2gr5u3es@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
af1db7f6b7
commit
4fed072609
3 changed files with 15 additions and 13 deletions
|
@ -1,6 +1,19 @@
|
|||
#ifndef SRCCODE_H
|
||||
#define SRCCODE_H 1
|
||||
|
||||
struct srccode_state {
|
||||
char *srcfile;
|
||||
unsigned line;
|
||||
};
|
||||
|
||||
static inline void srccode_state_init(struct srccode_state *state)
|
||||
{
|
||||
state->srcfile = NULL;
|
||||
state->line = 0;
|
||||
}
|
||||
|
||||
void srccode_state_free(struct srccode_state *state);
|
||||
|
||||
/* Result is not 0 terminated */
|
||||
char *find_sourceline(char *fn, unsigned line, int *lenp);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue