Changeset 1edd6d0 in mainline
- Timestamp:
- 2018-11-17T00:53:52Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e131833c
- Parents:
- af2d3e3
- Files:
-
- 7 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
.gitignore
raf2d3e3 r1edd6d0 450 450 uspace/srv/taskmon/taskmon 451 451 uspace/srv/test/chardev-test/chardev-test 452 uspace/srv/test/ipc-test/ipc-test 452 453 uspace/srv/vfs/vfs 453 454 uspace/srv/vfs/vfs.gz -
abi/include/abi/ipc/interfaces.h
raf2d3e3 r1edd6d0 181 181 FOURCC_COMPACT('v', 'o', 'l', ' ') | IFACE_EXCHANGE_SERIALIZE, 182 182 INTERFACE_VBD = 183 FOURCC_COMPACT('v', 'b', 'd', ' ') | IFACE_EXCHANGE_SERIALIZE 183 FOURCC_COMPACT('v', 'b', 'd', ' ') | IFACE_EXCHANGE_SERIALIZE, 184 INTERFACE_IPC_TEST = 185 FOURCC_COMPACT('i', 'p', 'c', 't') | IFACE_EXCHANGE_SERIALIZE 184 186 } iface_t; 185 187 -
boot/Makefile.common
raf2d3e3 r1edd6d0 123 123 taskmon \ 124 124 test/chardev-test \ 125 test/ipc-test \ 125 126 volsrv 126 127 -
uspace/Makefile
raf2d3e3 r1edd6d0 142 142 srv/hid/rfb \ 143 143 srv/test/chardev-test \ 144 srv/test/ipc-test \ 144 145 drv/audio/hdaudio \ 145 146 drv/audio/sb16 \ -
uspace/app/perf/Makefile
raf2d3e3 r1edd6d0 35 35 SOURCES = \ 36 36 perf.c \ 37 ipc/ns_ping.c \ 37 38 ipc/ping_pong.c 38 39 -
uspace/app/perf/ipc/ping_pong.c
raf2d3e3 r1edd6d0 31 31 #include <stdlib.h> 32 32 #include <time.h> 33 #include < ns.h>33 #include <ipc_test.h> 34 34 #include <async.h> 35 35 #include <errno.h> … … 39 39 #define NUM_SAMPLES 10 40 40 41 static errno_t ping_pong_measure(uint64_t niter, uint64_t *rduration) 41 static errno_t ping_pong_measure(ipc_test_t *test, uint64_t niter, 42 uint64_t *rduration) 42 43 { 43 44 struct timespec start; … … 47 48 48 49 for (count = 0; count < niter; count++) { 49 errno_t retval = ns_ping();50 errno_t retval = ipc_test_ping(test); 50 51 51 52 if (retval != EOK) { … … 79 80 uint64_t duration; 80 81 uint64_t dsmp[NUM_SAMPLES]; 82 ipc_test_t *test; 83 const char *msg; 81 84 82 printf("Benchmark ns server ping time\n"); 85 printf("Benchmark IPC test server ping time\n"); 86 rc = ipc_test_create(&test); 87 if (rc != EOK) 88 return "Failed contacting IPC test server."; 89 83 90 printf("Warm up and determine work size...\n"); 84 91 … … 89 96 90 97 while (true) { 91 rc = ping_pong_measure(niter, &duration); 92 if (rc != EOK) 93 return "Failed."; 98 rc = ping_pong_measure(test, niter, &duration); 99 if (rc != EOK) { 100 msg = "Failed."; 101 goto error; 102 } 94 103 95 104 ping_pong_report(niter, duration); … … 106 115 107 116 for (i = 0; i < NUM_SAMPLES; i++) { 108 rc = ping_pong_measure(niter, &dsmp[i]); 109 if (rc != EOK) 110 return "Failed."; 117 rc = ping_pong_measure(test, niter, &dsmp[i]); 118 if (rc != EOK) { 119 msg = "Failed."; 120 goto error; 121 } 111 122 112 123 ping_pong_report(niter, dsmp[i]); … … 132 143 avg, stddev, NUM_SAMPLES); 133 144 145 ipc_test_destroy(test); 134 146 return NULL; 147 error: 148 ipc_test_destroy(test); 149 return msg; 135 150 } -
uspace/app/perf/perf.c
raf2d3e3 r1edd6d0 42 42 benchmark_t benchmarks[] = { 43 43 #include "ipc/ping_pong.def" 44 #include "ipc/ns_ping.def" 44 45 { NULL, NULL, NULL } 45 46 }; -
uspace/app/perf/perf.h
raf2d3e3 r1edd6d0 46 46 } benchmark_t; 47 47 48 extern const char *bench_ns_ping(void); 48 49 extern const char *bench_ping_pong(void); 49 50 -
uspace/lib/c/Makefile
raf2d3e3 r1edd6d0 70 70 generic/gsort.c \ 71 71 generic/inttypes.c \ 72 generic/ipc_test.c \ 72 73 generic/loc.c \ 73 74 generic/mem.c \ -
uspace/lib/c/include/ipc/services.h
raf2d3e3 r1edd6d0 57 57 #define SERVICE_NAME_DNSR "net/dnsr" 58 58 #define SERVICE_NAME_INET "net/inet" 59 #define SERVICE_NAME_IPC_TEST "ipc-test" 59 60 #define SERVICE_NAME_NETCONF "net/netconf" 60 61 #define SERVICE_NAME_UDP "net/udp"
Note:
See TracChangeset
for help on using the changeset viewer.