Overview
| Comment: | Started work on xvfs-create-c, a pure C version of the builder with no dependencies |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | pure-c |
| Files: | files | file ages | folders |
| SHA3-256: |
ae8437b96bb9be94c39eadf358513d0f |
| User & Date: | rkeene on 2019-12-01 00:16:25.199 |
| Other Links: | branch diff | manifest | tags |
Context
|
2019-12-01
| ||
| 00:17 | Added the C file itself check-in: 20809b08ce user: rkeene tags: pure-c | |
| 00:16 | Started work on xvfs-create-c, a pure C version of the builder with no dependencies check-in: ae8437b96b user: rkeene tags: pure-c | |
|
2019-11-14
| ||
| 23:39 | Revert [ac58551e55], needs more work check-in: 992994189a user: rkeene tags: trunk | |
Changes
Modified Makefile
from [fa4437d0b1]
to [b414b18e08].
1 2 3 4 5 6 7 8 9 10 11 | 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 | - - - + + + + + + + |
TCL_CONFIG_SH := /usr/lib64/tclConfig.sh
XVFS_ROOT_MOUNTPOINT := //xvfs:/
CPPFLAGS := -DXVFS_ROOT_MOUNTPOINT='"$(XVFS_ROOT_MOUNTPOINT)"' -I. -DUSE_TCL_STUBS=1 -DXVFS_DEBUG $(shell . "${TCL_CONFIG_SH}" && echo "$${TCL_INCLUDE_SPEC}") $(XVFS_ADD_CPPFLAGS)
CFLAGS := -fPIC -g3 -ggdb3 -Wall $(XVFS_ADD_CFLAGS)
LDFLAGS := $(XVFS_ADD_LDFLAGS)
LIBS := $(shell . "${TCL_CONFIG_SH}" && echo "$${TCL_STUB_LIB_SPEC}")
TCLSH := tclsh
LIB_SUFFIX := $(shell . "${TCL_CONFIG_SH}"; echo "$${TCL_SHLIB_SUFFIX:-.so}")
all: example-standalone$(LIB_SUFFIX) example-client$(LIB_SUFFIX) example-flexible$(LIB_SUFFIX) xvfs$(LIB_SUFFIX)
|
| ︙ | |||
41 42 43 44 45 46 47 48 49 50 51 52 53 54 | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | + + + + + + | # like lib/minirivet, xvfs-core.c, etc) version of "xvfs-create" xvfs-create-standalone: $(shell find lib -type f) xvfs-create xvfs-core.c xvfs-core.h lib/xvfs/xvfs.c.rvt Makefile rm -f xvfs-create-standalone.new xvfs-create-standalone ./xvfs-create --dump-tcl --remove-debug > xvfs-create-standalone.new chmod +x xvfs-create-standalone.new mv xvfs-create-standalone.new xvfs-create-standalone xvfs-create-c: xvfs-create-c.o $(CC) $(CFLAGS) $(LDFLAGS) -o xvfs-create-c xvfs-create-c.o $(LIBS) xvfs-create-c.o: xvfs-create-c.c $(CC) $(CPPFLAGS) $(CFLAGS) -o xvfs-create-c.o -c xvfs-create-c.c xvfs_random$(LIB_SUFFIX): $(shell find example -type f) $(shell find lib -type f) lib/xvfs/xvfs.c.rvt xvfs-create-random Makefile ./xvfs-create-random | $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -DXVFS_MODE_FLEXIBLE -x c - -shared -o xvfs_random$(LIB_SUFFIX) $(LIBS) xvfs_synthetic$(LIB_SUFFIX): $(shell find lib -type f) lib/xvfs/xvfs.c.rvt xvfs-create-synthetic Makefile ./xvfs-create-synthetic | $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -DXVFS_MODE_FLEXIBLE -x c - -shared -o xvfs_synthetic$(LIB_SUFFIX) $(LIBS) do-benchmark: |
| ︙ | |||
95 96 97 98 99 100 101 | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | + - + | ./profile-gperf gprof ./profile-gperf valgrind --tool=callgrind --callgrind-out-file=callgrind.out ./profile-bare 10 2 callgrind_annotate callgrind.out clean: rm -f xvfs-create-standalone.new xvfs-create-standalone rm -f xvfs-create-c.o xvfs-create-c |
| ︙ |
Modified lib/xvfs/xvfs.c.rvt
from [ced159acac]
to [becb8ac3f3].
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | + + + + + + + - + |
<?
# Care must be taken when editing this file as
# it may be processed by either "xvfs-create"
# which uses a full Tcl and Rivet parser
# or by "xvfs-create-c" which uses a much
# simpler one that only knows about printable
# sections and ignores all Tcl sections
if {[info exists ::xvfs::xvfsCoreH]} {
|
| ︙ | |||
51 52 53 54 55 56 57 | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | - - + + - | } data; }; #endif <? package require xvfs |
| ︙ |
Modified lib/xvfs/xvfs.tcl
from [842e8c1c67]
to [6afa223420].
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | - - - - + - |
#! /usr/bin/env tclsh
namespace eval ::xvfs {}
namespace eval ::xvfs::callback {}
set ::xvfs::_xvfsDir [file dirname [info script]]
# Functions
proc ::xvfs::_emitLine {line} {
|
| ︙ | |||
278 279 280 281 282 283 284 285 286 287 288 289 290 291 | 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 | + + + |
}
## 3. Start processing directory and producing initial output
set ::xvfs::outputFiles [processDirectory $fsName $rootDirectory]
set ::xvfs::fsName $fsName
set ::xvfs::rootDirectory $rootDirectory
# Return the output
return [join $::xvfs::_emitLine "\n"]
}
proc ::xvfs::run {args} {
uplevel #0 { package require minirivet }
set ::xvfs::argv $args
::minirivet::parse [file join $::xvfs::_xvfsDir xvfs.c.rvt]
|
| ︙ |