about summary refs log tree commit diff stats
path: root/dev/git/index.html
blob: 463b506ad35084cc2a2216c327245a3ffac79f43 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<!DOCTYPE html>
<html dir="ltr" lang="en">
    <head>
    <meta charset='utf-8'>
    <title>Git</title>
</head>
<body>

    <a href="../index.html">Development Index</a>

    <h1>Git</h1>

    <p>Git user documentation.</p>

	<ul>
            <li><a href="install.html">1. Install and configure</a></li>
	    <li><a href="work.html">2. Work.</a>
		<ul>
	            <li><a href="work.html#local">2.1. Local workflow</a>
		    <li><a href="work.html#logdiff">2.2. Logs and commits</a></li>
		    <li><a href="work.html#remote">2.3. Working with remotes</a></li>
		</ul>
	    </li>

	    <li><a href="branch.html">3. Branches</a>
		<ul>
		    <li><a href="branch.html#teamwork">3.1. Team workflow</a></li>
		    <li><a href="branch.html#feature">3.2. Feature</a></li>
		    <li><a href="branch.html#release">3.3. Release</a></li>
		    <li><a href="branch.html#tags">3.4. Tags</a></li>
		    <li><a href="branch.html#hotfix">3.5. Hotfix</a></li>
		</ul>
	    </li>
	</ul>

    <a href="../index.html">Development Index</a>

    <p>This is part of the Hive System Documentation.
    Copyright (C) 2019
    Hive Team.
    See the file <a href="../../fdl-1.3-standalone.html">Gnu Free Documentation License</a>
    for copying conditions.</p>
</body>
</html>
int disabled: bool data*: array[400, LogEntry] TrackLogger* = proc (log: TrackLog) {.nimcall, tags: [], gcsafe.} var gLog*: TrackLog gLogger*: TrackLogger = proc (log: TrackLog) = discard ilocs: array[4000, (int, int)] ilocn: int proc trackLocation*(p: pointer; size: int) = let x = (cast[int](p), size) for i in 0..ilocn-1: # already known? if ilocs[i] == x: return ilocs[ilocn] = x inc ilocn proc setTrackLogger*(logger: TrackLogger) = gLogger = logger proc addEntry(entry: LogEntry) = if not gLog.disabled: var interesting = false for i in 0..ilocn-1: let p = ilocs[i] # X..Y and C..D overlap iff (X <= D and C <= Y) let x = p[0] let y = p[0]+p[1]-1 let c = cast[int](entry.address) let d = c + entry.size-1 if x <= d and c <= y: interesting = myThreadId() != entry.thread # true break if interesting: gLog.disabled = true cprintf("interesting %s:%ld %s\n", entry.file, entry.line, entry.op) let x = cast[proc() {.nimcall, tags: [], gcsafe, raises: [].}](writeStackTrace) x() quit 1 #if gLog.count > high(gLog.data): # gLogger(gLog) # gLog.count = 0 #gLog.data[gLog.count] = entry #inc gLog.count #gLog.disabled = false proc memTrackerWrite(address: pointer; size: int; file: cstring; line: int) {.compilerproc.} = addEntry LogEntry(op: "write", address: address, size: size, file: file, line: line, thread: myThreadId()) proc memTrackerOp*(op: cstring; address: pointer; size: int) {.tags: [], gcsafe.} = addEntry LogEntry(op: op, address: address, size: size, file: "", line: 0, thread: myThreadId()) proc memTrackerDisable*() = gLog.disabled = true proc memTrackerEnable*() = gLog.disabled = false proc logPendingOps() {.noconv.} = # forward declared and called from Nim's signal handler. gLogger(gLog) gLog.count = 0 import std/exitprocs addExitProc logPendingOps {.pop.}