trace2: create new combined trace facility

Create a new unified tracing facility for git.  The eventual intent is to
replace the current trace_printf* and trace_performance* routines with a
unified set of git_trace2* routines.

In addition to the usual printf-style API, trace2 provides higer-level
event verbs with fixed-fields allowing structured data to be written.
This makes post-processing and analysis easier for external tools.

Trace2 defines 3 output targets.  These are set using the environment
variables "GIT_TR2", "GIT_TR2_PERF", and "GIT_TR2_EVENT".  These may be
set to "1" or to an absolute pathname (just like the current GIT_TRACE).

* GIT_TR2 is intended to be a replacement for GIT_TRACE and logs command
  summary data.

* GIT_TR2_PERF is intended as a replacement for GIT_TRACE_PERFORMANCE.
  It extends the output with columns for the command process, thread,
  repo, absolute and relative elapsed times.  It reports events for
  child process start/stop, thread start/stop, and per-thread function
  nesting.

* GIT_TR2_EVENT is a new structured format. It writes event data as a
  series of JSON records.

Calls to trace2 functions log to any of the 3 output targets enabled
without the need to call different trace_printf* or trace_performance*
routines.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
39 files changed
tree: 4bc0418115d44b1833c1d24d2ac1c92f067b7ad3
  1. .github/
  2. block-sha1/
  3. builtin/
  4. ci/
  5. compat/
  6. contrib/
  7. Documentation/
  8. ewah/
  9. git-gui/
  10. gitk-git/
  11. gitweb/
  12. mergetools/
  13. negotiator/
  14. perl/
  15. po/
  16. ppc/
  17. refs/
  18. sha1dc/
  19. sha256/
  20. t/
  21. templates/
  22. trace2/
  23. vcs-svn/
  24. xdiff/
  25. .clang-format
  26. .editorconfig
  27. .gitattributes
  28. .gitignore
  29. .gitmodules
  30. .mailmap
  31. .travis.yml
  32. .tsan-suppressions
  33. abspath.c
  34. aclocal.m4
  35. advice.c
  36. advice.h
  37. alias.c
  38. alias.h
  39. alloc.c
  40. alloc.h
  41. apply.c
  42. apply.h
  43. archive-tar.c
  44. archive-zip.c
  45. archive.c
  46. archive.h
  47. argv-array.c
  48. argv-array.h
  49. attr.c
  50. attr.h
  51. azure-pipelines.yml
  52. banned.h
  53. base85.c
  54. bisect.c
  55. bisect.h
  56. blame.c
  57. blame.h
  58. blob.c
  59. blob.h
  60. branch.c
  61. branch.h
  62. builtin.h
  63. bulk-checkin.c
  64. bulk-checkin.h
  65. bundle.c
  66. bundle.h
  67. cache-tree.c
  68. cache-tree.h
  69. cache.h
  70. chdir-notify.c
  71. chdir-notify.h
  72. check-builtins.sh
  73. check-racy.c
  74. check_bindir
  75. checkout.c
  76. checkout.h
  77. color.c
  78. color.h
  79. column.c
  80. column.h
  81. combine-diff.c
  82. command-list.txt
  83. commit-graph.c
  84. commit-graph.h
  85. commit-reach.c
  86. commit-reach.h
  87. commit-slab-decl.h
  88. commit-slab-impl.h
  89. commit-slab.h
  90. commit.c
  91. commit.h
  92. common-main.c
  93. config.c
  94. config.h
  95. config.mak.dev
  96. config.mak.in
  97. config.mak.uname
  98. configure.ac
  99. connect.c
  100. connect.h
  101. connected.c
  102. connected.h
  103. convert.c
  104. convert.h
  105. copy.c
  106. COPYING
  107. credential-cache--daemon.c
  108. credential-cache.c
  109. credential-store.c
  110. credential.c
  111. credential.h
  112. csum-file.c
  113. csum-file.h
  114. ctype.c
  115. daemon.c
  116. date.c
  117. decorate.c
  118. decorate.h
  119. delta-islands.c
  120. delta-islands.h
  121. delta.h
  122. detect-compiler
  123. diff-delta.c
  124. diff-lib.c
  125. diff-no-index.c
  126. diff.c
  127. diff.h
  128. diffcore-break.c
  129. diffcore-delta.c
  130. diffcore-order.c
  131. diffcore-pickaxe.c
  132. diffcore-rename.c
  133. diffcore.h
  134. dir-iterator.c
  135. dir-iterator.h
  136. dir.c
  137. dir.h
  138. editor.c
  139. entry.c
  140. environment.c
  141. exec-cmd.c
  142. exec-cmd.h
  143. fast-import.c
  144. fetch-negotiator.c
  145. fetch-negotiator.h
  146. fetch-object.c
  147. fetch-object.h
  148. fetch-pack.c
  149. fetch-pack.h
  150. fmt-merge-msg.h
  151. fsck.c
  152. fsck.h
  153. fsmonitor.c
  154. fsmonitor.h
  155. fuzz-commit-graph.c
  156. fuzz-pack-headers.c
  157. fuzz-pack-idx.c
  158. generate-cmdlist.sh
  159. gettext.c
  160. gettext.h
  161. git-add--interactive.perl
  162. git-archimport.perl
  163. git-bisect.sh
  164. git-compat-util.h
  165. git-cvsexportcommit.perl
  166. git-cvsimport.perl
  167. git-cvsserver.perl
  168. git-difftool--helper.sh
  169. git-filter-branch.sh
  170. git-instaweb.sh
  171. git-legacy-rebase.sh
  172. git-merge-octopus.sh
  173. git-merge-one-file.sh
  174. git-merge-resolve.sh
  175. git-mergetool--lib.sh
  176. git-mergetool.sh
  177. git-p4.py
  178. git-parse-remote.sh
  179. git-quiltimport.sh
  180. git-rebase--am.sh
  181. git-rebase--common.sh
  182. git-rebase--preserve-merges.sh
  183. git-remote-testgit.sh
  184. git-request-pull.sh
  185. git-send-email.perl
  186. git-sh-i18n.sh
  187. git-sh-setup.sh
  188. git-stash.sh
  189. git-submodule.sh
  190. git-svn.perl
  191. GIT-VERSION-GEN
  192. git-web--browse.sh
  193. git.c
  194. git.rc
  195. gpg-interface.c
  196. gpg-interface.h
  197. graph.c
  198. graph.h
  199. grep.c
  200. grep.h
  201. hash.h
  202. hashmap.c
  203. hashmap.h
  204. help.c
  205. help.h
  206. hex.c
  207. http-backend.c
  208. http-fetch.c
  209. http-push.c
  210. http-walker.c
  211. http.c
  212. http.h
  213. ident.c
  214. imap-send.c
  215. INSTALL
  216. interdiff.c
  217. interdiff.h
  218. iterator.h
  219. json-writer.c
  220. json-writer.h
  221. khash.h
  222. kwset.c
  223. kwset.h
  224. levenshtein.c
  225. levenshtein.h
  226. LGPL-2.1
  227. line-log.c
  228. line-log.h
  229. line-range.c
  230. line-range.h
  231. linear-assignment.c
  232. linear-assignment.h
  233. list-objects-filter-options.c
  234. list-objects-filter-options.h
  235. list-objects-filter.c
  236. list-objects-filter.h
  237. list-objects.c
  238. list-objects.h
  239. list.h
  240. ll-merge.c
  241. ll-merge.h
  242. lockfile.c
  243. lockfile.h
  244. log-tree.c
  245. log-tree.h
  246. ls-refs.c
  247. ls-refs.h
  248. mailinfo.c
  249. mailinfo.h
  250. mailmap.c
  251. mailmap.h
  252. Makefile
  253. match-trees.c
  254. mem-pool.c
  255. mem-pool.h
  256. merge-blobs.c
  257. merge-blobs.h
  258. merge-recursive.c
  259. merge-recursive.h
  260. merge.c
  261. mergesort.c
  262. mergesort.h
  263. midx.c
  264. midx.h
  265. name-hash.c
  266. notes-cache.c
  267. notes-cache.h
  268. notes-merge.c
  269. notes-merge.h
  270. notes-utils.c
  271. notes-utils.h
  272. notes.c
  273. notes.h
  274. object-store.h
  275. object.c
  276. object.h
  277. oidmap.c
  278. oidmap.h
  279. oidset.c
  280. oidset.h
  281. pack-bitmap-write.c
  282. pack-bitmap.c
  283. pack-bitmap.h
  284. pack-check.c
  285. pack-objects.c
  286. pack-objects.h
  287. pack-revindex.c
  288. pack-revindex.h
  289. pack-write.c
  290. pack.h
  291. packfile.c
  292. packfile.h
  293. pager.c
  294. parse-options-cb.c
  295. parse-options.c
  296. parse-options.h
  297. patch-delta.c
  298. patch-ids.c
  299. patch-ids.h
  300. path.c
  301. path.h
  302. pathspec.c
  303. pathspec.h
  304. pkt-line.c
  305. pkt-line.h
  306. preload-index.c
  307. pretty.c
  308. pretty.h
  309. prio-queue.c
  310. prio-queue.h
  311. progress.c
  312. progress.h
  313. prompt.c
  314. prompt.h
  315. protocol.c
  316. protocol.h
  317. quote.c
  318. quote.h
  319. range-diff.c
  320. range-diff.h
  321. reachable.c
  322. reachable.h
  323. read-cache.c
  324. README.md
  325. rebase-interactive.c
  326. rebase-interactive.h
  327. ref-filter.c
  328. ref-filter.h
  329. reflog-walk.c
  330. reflog-walk.h
  331. refs.c
  332. refs.h
  333. refspec.c
  334. refspec.h
  335. remote-curl.c
  336. remote-testsvn.c
  337. remote.c
  338. remote.h
  339. replace-object.c
  340. replace-object.h
  341. repository.c
  342. repository.h
  343. rerere.c
  344. rerere.h
  345. resolve-undo.c
  346. resolve-undo.h
  347. revision.c
  348. revision.h
  349. run-command.c
  350. run-command.h
  351. send-pack.c
  352. send-pack.h
  353. sequencer.c
  354. sequencer.h
  355. serve.c
  356. serve.h
  357. server-info.c
  358. setup.c
  359. sh-i18n--envsubst.c
  360. sha1-array.c
  361. sha1-array.h
  362. sha1-file.c
  363. sha1-lookup.c
  364. sha1-lookup.h
  365. sha1-name.c
  366. sha1dc_git.c
  367. sha1dc_git.h
  368. shallow.c
  369. shell.c
  370. shortlog.h
  371. sideband.c
  372. sideband.h
  373. sigchain.c
  374. sigchain.h
  375. split-index.c
  376. split-index.h
  377. strbuf.c
  378. strbuf.h
  379. streaming.c
  380. streaming.h
  381. string-list.c
  382. string-list.h
  383. sub-process.c
  384. sub-process.h
  385. submodule-config.c
  386. submodule-config.h
  387. submodule.c
  388. submodule.h
  389. symlinks.c
  390. tag.c
  391. tag.h
  392. tar.h
  393. tempfile.c
  394. tempfile.h
  395. thread-utils.c
  396. thread-utils.h
  397. tmp-objdir.c
  398. tmp-objdir.h
  399. trace.c
  400. trace.h
  401. trace2.c
  402. trace2.h
  403. trailer.c
  404. trailer.h
  405. transport-helper.c
  406. transport-internal.h
  407. transport.c
  408. transport.h
  409. tree-diff.c
  410. tree-walk.c
  411. tree-walk.h
  412. tree.c
  413. tree.h
  414. unicode-width.h
  415. unimplemented.sh
  416. unix-socket.c
  417. unix-socket.h
  418. unpack-trees.c
  419. unpack-trees.h
  420. upload-pack.c
  421. upload-pack.h
  422. url.c
  423. url.h
  424. urlmatch.c
  425. urlmatch.h
  426. usage.c
  427. userdiff.c
  428. userdiff.h
  429. utf8.c
  430. utf8.h
  431. varint.c
  432. varint.h
  433. version.c
  434. version.h
  435. versioncmp.c
  436. walker.c
  437. walker.h
  438. wildmatch.c
  439. wildmatch.h
  440. worktree.c
  441. worktree.h
  442. wrap-for-bin.sh
  443. wrapper.c
  444. write-or-die.c
  445. ws.c
  446. wt-status.c
  447. wt-status.h
  448. xdiff-interface.c
  449. xdiff-interface.h
  450. zlib.c
README.md

Build Status

Git - fast, scalable, distributed revision control system

Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals.

Git is an Open Source project covered by the GNU General Public License version 2 (some parts of it are under different licenses, compatible with the GPLv2). It was originally written by Linus Torvalds with help of a group of hackers around the net.

Please read the file INSTALL for installation instructions.

Many Git online resources are accessible from https://git-scm.com/ including full documentation and Git related tools.

See Documentation/gittutorial.txt to get started, then see Documentation/giteveryday.txt for a useful minimum set of commands, and Documentation/git-.txt for documentation of each command. If git has been correctly installed, then the tutorial can also be read with man gittutorial or git help tutorial, and the documentation of each command with man git-<commandname> or git help <commandname>.

CVS users may also want to read Documentation/gitcvs-migration.txt (man gitcvs-migration or git help cvs-migration if git is installed).

The user discussion and development of Git take place on the Git mailing list -- everyone is welcome to post bug reports, feature requests, comments and patches to git@vger.kernel.org (read Documentation/SubmittingPatches for instructions on patch submission). To subscribe to the list, send an email with just “subscribe git” in the body to majordomo@vger.kernel.org. The mailing list archives are available at https://public-inbox.org/git/, http://marc.info/?l=git and other archival sites.

Issues which are security relevant should be disclosed privately to the Git Security mailing list git-security@googlegroups.com.

The maintainer frequently sends the “What's cooking” reports that list the current status of various development topics to the mailing list. The discussion following them give a good reference for project status, development direction and remaining tasks.

The name “git” was given by Linus Torvalds when he wrote the very first version. He described the tool as “the stupid content tracker” and the name as (depending on your mood):

  • random three-letter combination that is pronounceable, and not actually used by any common UNIX command. The fact that it is a mispronunciation of “get” may or may not be relevant.
  • stupid. contemptible and despicable. simple. Take your pick from the dictionary of slang.
  • “global information tracker”: you're in a good mood, and it actually works for you. Angels sing, and a light suddenly fills the room.
  • “goddamn idiotic truckload of sh*t”: when it breaks