annotate runtime/syntax/gprof.vim @ 18488:1d7e6b677119

Added tag v8.1.2238 for changeset 5b95ccb82c0a40200e87ba6b07455e6dfaa31f22
author Bram Moolenaar <Bram@vim.org>
date Fri, 01 Nov 2019 20:00:05 +0100
parents a5352e73dc00
children 9f41bfdbc6fc
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>
4869
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4681
diff changeset
4 " Last Change: 2013 Jun 09
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")
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 finish
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
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 syn case match
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 syn sync minlines=100
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 " Flat profile
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 syn match gprofFlatProfileTitle
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 \ "^Flat profile:$"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 syn region gprofFlatProfileHeader
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 \ start="^Each sample counts as.*"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 \ end="^ time.*name\s*$"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 syn region gprofFlatProfileTrailer
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 \ start="^\s*%\s\+the percentage of the total running time.*"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 \ 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
25
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 " Call graph
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 syn match gprofCallGraphTitle "Call graph (explanation follows)"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 syn region gprofCallGraphHeader
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 \ start="^granularity: each sample hit covers.*"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 \ end="^\s*index % time\s\+self\s\+children\s\+called\s\+name$"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 syn match gprofCallGraphFunction "\s\+\(\d\+\.\d\+\s\+\)\{3}\([0-9+]\+\)\?\s\+[a-zA-Z_<].*\ze\["
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 syn match gprofCallGraphSeparator "^-\+$"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 syn region gprofCallGraphTrailer
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 \ start="This table describes the call tree of the program"
4869
a5352e73dc00 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4681
diff changeset
35 \ end="^\s*the cycle\.$"
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 " Index
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 syn region gprofIndex
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39 \ start="^Index by function name$"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40 \ end="\%$"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42 syn match gprofIndexFunctionTitle "^Index by function name$"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 syn match gprofNumbers "^\s\+[0-9 ./+]\+"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
45 syn match gprofFunctionIndex "\[\d\+\]"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46 syn match gprofSpecial "<\(spontaneous\|cycle \d\+\)>"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
47
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
48 hi def link gprofFlatProfileTitle Title
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
49 hi def link gprofFlatProfileHeader Comment
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
50 hi def link gprofFlatProfileFunction Number
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
51 hi def link gprofFlatProfileTrailer Comment
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53 hi def link gprofCallGraphTitle Title
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
54 hi def link gprofCallGraphHeader Comment
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
55 hi def link gprofFlatProfileFunction Number
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
56 hi def link gprofCallGraphFunction Special
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
57 hi def link gprofCallGraphTrailer Comment
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
58 hi def link gprofCallGraphSeparator Label
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
59
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
60 hi def link gprofFunctionIndex Label
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
61 hi def link gprofSpecial SpecialKey
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
62 hi def link gprofNumbers Number
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
63
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
64 hi def link gprofIndexFunctionTitle Title
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
65
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
66 let b:current_syntax = "gprof"
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
67
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
68 let &cpo = s:keepcpo
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
69 unlet s:keepcpo