LMbench是个可移植的,用于评价系统综合性能的多平台开源benchmark,能够测试包括文档读写、内存操作、进程创建销毁开销、网络等性能。通过以下步骤操作,即可将LMbench移植到Android上。
- 下载LMbench源码
下载地址http://sourceforge.net/projects/lmbench/
也可在本站下载
- 修改LMbench代码
1.解压缩到指定的目录,保证最终的目录如下:
├── lmbench3/
│ ├── jni/
│ ├── doc/
│ ├── result/
│ ├── scripts/
│ ├── src/
│ ├── ACKNOWLEDGEMENTS
│ ├── CHANGES
│ ├── COPYING
│ ├── COPYING-2
│ ├── hbench-REBUTTAL
│ ├── Makefile
│ ├── README
2.修改“src/bench.h”的38行,40行,注释掉“#include <rpc/rpc.h>”,“#include <rpc/types.h>”,然后添加如下定义
1 2 3 4 5 6 7 |
#ifndef S_IREAD #define S_IREAD S_IRUSR #endif #ifndef S_IWRITE #define S_IWRITE S_IWUSR #endif |
3.添加根目录下面Android.mk,jni/目录下面内容如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. BUILD_LMBENCH := true include $(call all-subdir-makefiles) |
4.添加根目录下面Android.mk,jni/src目录下面内容如下:
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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 |
# Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ifeq ($(BUILD_LMBENCH),true) LOCAL_PATH := $(call my-dir) COMMON_CFLAGS := -DANDROID -DHAVE_uint COMMON_LIBS := lmbench_lib ANDROID_LMBENCH := true # Build lmbench_lib include $(CLEAR_VARS) LOCAL_SRC_FILES := lib_unix.c lib_timing.c \ lib_mem.c lib_stats.c lib_debug.c getopt.c lib_sched.c ifneq ($(ANDROID_LMBENCH),true) LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) lib_tcp.c lib_udp.c endif LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := lmbench_lib include $(BUILD_STATIC_LIBRARY) # # Build mhz on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= mhz.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := mhz include $(BUILD_EXECUTABLE) # # Build bw_file_rd on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= bw_file_rd.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := bw_file_rd include $(BUILD_EXECUTABLE) # # Build bw_mem on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= bw_mem.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := bw_mem include $(BUILD_EXECUTABLE) # # Build bw_mmap_rd on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= bw_mmap_rd.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := bw_mmap_rd include $(BUILD_EXECUTABLE) # # Build bw_pipe on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= bw_pipe.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := bw_pipe include $(BUILD_EXECUTABLE) ifneq ($(ANDROID_LMBENCH),true) # # Build bw_tcp on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= bw_tcp.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := bw_tcp include $(BUILD_EXECUTABLE) endif # # Build bw_unix on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= bw_unix.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := bw_unix include $(BUILD_EXECUTABLE) # # Build lat_cmd on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= lat_cmd.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := lat_cmd include $(BUILD_EXECUTABLE) ifneq ($(ANDROID_LMBENCH),true) # # Build lat_connect on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= lat_connect.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := lat_connect include $(BUILD_EXECUTABLE) endif # # Build lat_ctx on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= lat_ctx.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := lat_ctx include $(BUILD_EXECUTABLE) # # Build lat_fcntl on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= lat_fcntl.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := lat_fcntl include $(BUILD_EXECUTABLE) # # Build lat_fs on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= lat_fs.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := lat_fs include $(BUILD_EXECUTABLE) # # Build lat_mem_rd on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= lat_mem_rd.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := lat_mem_rd include $(BUILD_EXECUTABLE) # # Build lat_mmap on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= lat_mmap.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := lat_mmap include $(BUILD_EXECUTABLE) # # Build lat_ops on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= lat_ops.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := lat_ops include $(BUILD_EXECUTABLE) # # Build lat_pipe on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= lat_pipe.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := lat_pipe include $(BUILD_EXECUTABLE) # # Build lat_pagefault on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= lat_pagefault.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := lat_pagefault include $(BUILD_EXECUTABLE) # # Build lat_proc on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= lat_proc.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := lat_proc include $(BUILD_EXECUTABLE) # # Build lat_rand on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= lat_rand.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := lat_rand include $(BUILD_EXECUTABLE) ifneq ($(ANDROID_LMBENCH),true) # # Build lat_tcp on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= lat_tcp.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := lat_tcp include $(BUILD_EXECUTABLE) endif ifneq ($(ANDROID_LMBENCH),true) # # Build lat_sem on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= lat_sem.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := lat_sem include $(BUILD_EXECUTABLE) endif # # Build lat_sig on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= lat_sig.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := lat_sig include $(BUILD_EXECUTABLE) # # Build lat_syscall on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= lat_syscall.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := lat_syscall include $(BUILD_EXECUTABLE) ifneq ($(ANDROID_LMBENCH),true) # # Build lat_udp on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= lat_udp.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := lat_udp include $(BUILD_EXECUTABLE) endif # # Build lat_unix on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= lat_unix.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := lat_unix include $(BUILD_EXECUTABLE) # # Build lat_usleep on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= lat_usleep.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) -DTRUE=1 -DFALSE=0 LOCAL_MODULE_TAGS := eng LOCAL_MODULE := lat_usleep include $(BUILD_EXECUTABLE) # # Build cache on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= cache.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := cache include $(BUILD_EXECUTABLE) # # Build line on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= line.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := line include $(BUILD_EXECUTABLE) # # Build lmdd on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= lmdd.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := lmdd include $(BUILD_EXECUTABLE) # # Build tlb on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= tlb.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := tlb include $(BUILD_EXECUTABLE) # # Build stream on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= stream.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := lmstream include $(BUILD_EXECUTABLE) # # Build memsize on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= memsize.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := memsize include $(BUILD_EXECUTABLE) ifneq ($(ANDROID_LMBENCH),true) # # Build lat_select on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= lat_select.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := lat_select include $(BUILD_EXECUTABLE) endif # # Build lat_unix_connect on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= lat_unix_connect.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := lat_unix_connect include $(BUILD_EXECUTABLE) # # Build lat_fifo on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= lat_fifo.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := lat_fifo include $(BUILD_EXECUTABLE) ifneq ($(ANDROID_LMBENCH),true) # # Build lat_http on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= lat_http.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := lat_http include $(BUILD_EXECUTABLE) endif # # Build par_mem on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= par_mem.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := par_mem include $(BUILD_EXECUTABLE) # # Build par_ops on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= par_ops.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := par_ops include $(BUILD_EXECUTABLE) # # Build enough on target # include $(CLEAR_VARS) LOCAL_SRC_FILES:= enough.c LOCAL_STATIC_LIBRARIES := $(COMMON_LIBS) LOCAL_C_INCLUDES := $(common_target_c_includes) LOCAL_CFLAGS := $(COMMON_CFLAGS) $(common_target_cflags) LOCAL_MODULE_TAGS := eng LOCAL_MODULE := enough include $(BUILD_EXECUTABLE) endif |
- 编译LMbench代码
1 |
ndk-build NDK_PROJECT_PATH=/lmbench3 |
编译完成后的文件存放在“lmbench3\libs\armeabi”目录下面。
- 测试内存带宽
1 |
./bw_mem 16M rdwr |
更详细的命令参数,参考bw_mem
- 参考链接