annotate runtime/syntax/gprof.vim @ 35198:8cb8025670aa default tip

Added tag v9.1.0418 for changeset ffa6ed03a9f2718c1c898c53de7dfe0860986ae3
author Christian Brabandt <cb@256bit.org>
date Fri, 17 May 2024 19:00:05 +0200
parents 65de67669df3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2 " Language: Syntax for Gprof Output
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 " Maintainer: Dominique Pelle <dominique.pelle@gmail.com>
25836
65de67669df3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 24468
diff changeset
4 " Last Change: 2021 Sep 19
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 " Quit when a syntax file was already loaded
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 if exists("b:current_syntax")
25836
65de67669df3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 24468
diff changeset
8 finish
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 endif
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 let s:keepcpo= &cpo
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 set cpo&vim
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12
25836
65de67669df3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 24468
diff changeset
13 syn spell notoplevel
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 syn case match
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 syn sync minlines=100
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 " Flat profile
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 syn match gprofFlatProfileTitle
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 \ "^Flat profile:$"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 syn region gprofFlatProfileHeader
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 \ start="^Each sample counts as.*"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 \ end="^ time.*name\s*$"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 syn region gprofFlatProfileTrailer
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 \ start="^\s*%\s\+the percentage of the total running time.*"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 \ end="^\s*the gprof listing if it were to be printed\."
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 " Call graph
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 syn match gprofCallGraphTitle "Call graph (explanation follows)"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 syn region gprofCallGraphHeader
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 \ start="^granularity: each sample hit covers.*"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 \ end="^\s*index % time\s\+self\s\+children\s\+called\s\+name$"
24468
9f41bfdbc6fc Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 4869
diff changeset
32 syn match gprofCallGraphFunction "\<\(\d\+\.\d\+\s\+\)\{3}\([0-9+]\+\)\?\s\+[a-zA-Z_<].*\ze\["
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 syn match gprofCallGraphSeparator "^-\+$"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 syn region gprofCallGraphTrailer
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 \ start="This table describes the call tree of the program"
4869
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4681
diff changeset
36 \ end="^\s*the cycle\.$"
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 " Index
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39 syn region gprofIndex
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40 \ start="^Index by function name$"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 \ end="\%$"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 syn match gprofIndexFunctionTitle "^Index by function name$"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44
24468
9f41bfdbc6fc Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 4869
diff changeset
45 syn match gprofNumbers "^\s*[0-9 ./+]\+"
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46 syn match gprofFunctionIndex "\[\d\+\]"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
47 syn match gprofSpecial "<\(spontaneous\|cycle \d\+\)>"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
48
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
49 hi def link gprofFlatProfileTitle Title
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
50 hi def link gprofFlatProfileHeader Comment
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
51 hi def link gprofFlatProfileFunction Number
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52 hi def link gprofFlatProfileTrailer Comment
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
54 hi def link gprofCallGraphTitle Title
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
55 hi def link gprofCallGraphHeader Comment
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
56 hi def link gprofFlatProfileFunction Number
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
57 hi def link gprofCallGraphFunction Special
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
58 hi def link gprofCallGraphTrailer Comment
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
59 hi def link gprofCallGraphSeparator Label
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
60
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
61 hi def link gprofFunctionIndex Label
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
62 hi def link gprofSpecial SpecialKey
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
63 hi def link gprofNumbers Number
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
64
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
65 hi def link gprofIndexFunctionTitle Title
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
66
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
67 let b:current_syntax = "gprof"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
68
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
69 let &cpo = s:keepcpo
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
70 unlet s:keepcpo