OpenXiangShan / XiangShan-doc

Documentation for XiangShan
https://xiangshan-doc.readthedocs.io
Creative Commons Attribution 4.0 International
329 stars 126 forks source link

生成的simpoint_bbv.gz文件是空 #80

Closed qqli579 closed 4 months ago

qqli579 commented 5 months ago

我测试了一下specCPU2006 里的gobmk_13x13,想生成checkpoint。看log,程序跑完了,但是生成的simpoint_bbv.gz文件是空的。指令如下:

/xiangshang/NEMU-master/NEMU/build/riscv64-nemu-interpreter /xiangshang/linux/riscv-pk/build/bbl.bin -D /xiangshang/NEMU-master/spec2006CheckPoint/CPU2006Simpoint -w 445.gobmk -C cpu2006-simpoint-profiling -b --simpoint-profile --cpt-interval 20000000 -r /xiangshang/NEMU-master/NEMU/resource/gcpt_restore/build/gcpt.bin

log 如下:

bbl loader

freq-mhz = 500
CLINT: set frequency to 500 MHz
              vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

                  vvvvvvvvvvvvvvvvvvvvvvvvvvvv

rrrrrrrrrrrrr       vvvvvvvvvvvvvvvvvvvvvvvvvv

rrrrrrrrrrrrrrrr      vvvvvvvvvvvvvvvvvvvvvvvv

rrrrrrrrrrrrrrrrrr    vvvvvvvvvvvvvvvvvvvvvvvv

rrrrrrrrrrrrrrrrrr    vvvvvvvvvvvvvvvvvvvvvvvv

rrrrrrrrrrrrrrrrrr    vvvvvvvvvvvvvvvvvvvvvvvv

rrrrrrrrrrrrrrrr      vvvvvvvvvvvvvvvvvvvvvv  

rrrrrrrrrrrrr       vvvvvvvvvvvvvvvvvvvvvv    

rr                vvvvvvvvvvvvvvvvvvvvvv      

rr            vvvvvvvvvvvvvvvvvvvvvvvv      rr

rrrr      vvvvvvvvvvvvvvvvvvvvvvvvvv      rrrr

rrrrrr      vvvvvvvvvvvvvvvvvvvvvv      rrrrrr

rrrrrrrr      vvvvvvvvvvvvvvvvvv      rrrrrrrr

rrrrrrrrrr      vvvvvvvvvvvvvv      rrrrrrrrrr

rrrrrrrrrrrr      vvvvvvvvvv      rrrrrrrrrrrr

rrrrrrrrrrrrrr      vvvvvv      rrrrrrrrrrrrrr

rrrrrrrrrrrrrrrr      vv      rrrrrrrrrrrrrrrr

rrrrrrrrrrrrrrrrrr          rrrrrrrrrrrrrrrrrr

rrrrrrrrrrrrrrrrrrrr      rrrrrrrrrrrrrrrrrrrr

rrrrrrrrrrrrrrrrrrrrrr  rrrrrrrrrrrrrrrrrrrrrr

       INSTRUCTION SETS WANT TO BE FREE

[    0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000

[    0.000000] Linux version 4.18.0 (hukun@n168-020-004) (gcc version 12.2.0 (g2ee5e430018)) #6 Fri Mar 1 11:43:52 CST 2024

[    0.000000] bootconsole [early0] enabled

[    0.000000] Initial ramdisk at: 0x(____ptrval____) (13131776 bytes)

[    0.000000] Zone ranges:

[    0.000000]   DMA32    empty

[    0.000000]   Normal   [mem 0x0000000080200000-0x00000000ffffffff]

[    0.000000] Movable zone start for each node

[    0.000000] Early memory node ranges

[    0.000000]   node   0: [mem 0x0000000080200000-0x00000000ffffffff]

[    0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x00000000ffffffff]

[    0.000000] software IO TLB [mem 0xfa3ff000-0xfe3ff000] (64MB) mapped at [(____ptrval____)-(____ptrval____)]

[    0.000000] elf_hwcap is 0x112d

[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 516615

[    0.000000] Kernel command line: root=/dev/mmcblk0 rootfstype=ext4 ro rootwait earlycon

[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)

[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)

[    0.000000] Sorting __ex_table...

[    0.000000] Memory: 1983476K/2095104K available (712K kernel code, 78K rwdata, 102K rodata, 12892K init, 98K bss, 111628K reserved, 0K cma-reserved)

[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1

[    0.000000] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0

[    0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 3526361616960 ns

[    0.000000] console [hvc0] enabled

[    0.000000] console [hvc0] enabled

[    0.000000] bootconsole [early0] disabled

[    0.000000] bootconsole [early0] disabled

[    0.000000] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.00 BogoMIPS (lpj=10000)

[    0.000000] pid_max: default: 4096 minimum: 301

[    0.000000] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)

[    0.000000] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)

[    0.010000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns

[    0.010000] futex hash table entries: 16 (order: -4, 384 bytes)

[    0.020000] clocksource: Switched to clocksource riscv_clocksource

[    1.620000] Unpacking initramfs...

[    3.190000] workingset: timestamp_bits=62 max_order=19 bucket_order=0

[    3.200000] random: get_random_bytes called from 0xffffffff80c9ac66 with crng_init=0

[    3.300000] Freeing unused kernel memory: 12892K

[    3.300000] This architecture does not have kernel memory protection.

===== Start running SPEC2006 =====

======== BEGIN gobmk_13x13 ========

+ md5sum /spec/gobmk_base.riscv64-gcc10

7f60c96700e8008bc6cc89bf2f8e6940  /spec/gobmk_base.riscv64-gcc10

+ date -R

Thu, 01 Jan 1970 00:00:07 +0000

+ cd /spec

+ ./gobmk_base.riscv64-gcc10 --quiet --mode gtp

= white

=1 J2

= white

=2 E10

= white

=3 E5

= white

=4 M4

= white

=5 N9

= white

=6 M8

= white

=7 M1

= white

=8 H8

= white

=9 B6

= white

=10 E3

= white

=11 G6

= white

=12 G7

= white

=13 G7

= white

=14 E8

= white

=15 C7

= white

=16 C6

= white

=17 L5

= white

=18 0

= white

=19 C10

= white

=20 M8

= white

=21 N8

= white

=22 C9

= white

=23 E12

= white

=24 H6

= white

=25 J5

= white

=26 J5

= white

=27 E3

= white

=28 E3

= white

=29 C8

= white

=30 B7

= white

=31 M4

= white

=33 E7

= white

=34 K13

= white

=35 B13

= white

=36 B2

= white

=37 E10

= white

=38 G10

= white

=39 H4

= white

=40 L11

= white

=41 H10

= white

=42 C7

= black

=43 D6

= black

=44 B6

= black

=45 B4

= black

=46 L3

= black

=47 K9

= black

=48 K7

= black

=49 K7

= black

=149 H12

= black

=50 H12

= black

=51 N9

= black

=52 H10

= black

=53 C6

= black

=54 H11

= black

=55 H6

= black

=56 H4

= black

=57 N7

= black

=58 0

= black

=59 K5

= black

=60 G3

= black

=61 K8

= black

=62 C12

= black

=63 K4

= black

=64 M3

= black

=65 L2

= black

=66 M5

= black

=67 B9

= black

=68 A8

= black

=69 D5

= black

=70 L10

= black

=71 J11

= black

=72 J10

= black

=73 H4

= black

=74 G7

= black

=75 E6

= black

=76 J3

= black

=77 C8

= black

=78 L4

= black

=79 M5

= black

=80 M2

= black

=81 M8

= black

=82 K4

= black

=83 L12

= black

=84 H13

= black

=85 D2

= black

=86 1 H5

= black

=87 F6

= black

=88 D6

= black

=89 0

= black

=90 A5

= black

=91 F5

+ date -R

Thu, 01 Jan 1970 03:38:13 +0000

+ set +x

======== END   gobmk_13x13 ========

===== Finish running SPEC2006 =====

但是运行指令的窗口还没有结束,一直停住在下面

/xiangshang/NEMU-master/NEMU/build/riscv64-nemu-interpreter /xiangshang/linux/riscv-pk/build/bbl.bin -D /xiangshang/NEMU-master/spec2006CheckPoint/CPU2006Simpoint -w 445.gobmk -C cpu2006-simpoint-profiling -b --simpoint-profile --cpt-interval 20000000 -r /xiangshang/NEMU-master/NEMU/resource/gcpt_restore/build/gcpt.bin

NEMU 用的是master分支。请问simpoint_bbv.gz文件是空的是什么原因

shinezyy commented 5 months ago

看起来是before workload程序没有正确执行。有可能是你的before workload编译出错,或者initramfs没有把before workload打包进去。

qqli579 commented 5 months ago

initramfs-spec.txt 文件里已经打包了:

# SPEC common
dir /spec_common 755 0 0
file /spec_common/before_workload /xiangshang/linux/riscv-rootfs-cp/riscv-rootfs/apps/before_workload/build/before_workload 755 0 0
file /spec_common/trap /xiangshang/linux/riscv-rootfs-cp/riscv-rootfs/apps/trap/build/trap 755 0 0

并且before_workload 已经编译成功了,没有报错。编译riscv-pk的时候没有报错。并且指向了initramfs-spec.txt:

CONFIG_INITRAMFS_SOURCE=/xiangshang/linux/riscv-rootfs/rootfsimg/initramfs-spec.txt

并且/xiangshang/linux/riscv-pk/bbl/bbl.lds做了修改:

  /* Begining of code and text segment */
  . = MEM_START + 0xa0000;
  _ftext = .;

/xiangshang/linux/riscv-pk/dts/noop.dtsi也做了修改:

/dts-v1/;

/ {
    L18: soc {
        L2: clint@2000000 {
            compatible = "riscv,clint0";
            interrupts-extended = <&L4 3 &L4 7>;
            reg = <0x0 0x38000000 0x0 0x10000>;
            reg-names = "control";
            clock-frequency-mhz = <500>;
        };
        L14: serial@60000000 {
            compatible = "xilinx,uartlite";
            //interrupt-parent = <&L1>;
            interrupts = <3>;
            reg = <0x0 0x40600000 0x0 0x1000>;
            reg-names = "control";
        };
    sdhci: mmc {
      compatible = "nemu-sdhost";
            reg = <0x0 0x40002000 0x0 0x1000>;
    };
    };
  chosen {
    bootargs = "root=/dev/mmcblk0 rootfstype=ext4 ro rootwait earlycon";
  };
    L11: memory@100000000 {
        device_type = "memory";
        reg = <0x0 0x80000000 0x0 0x80000000>;
    };
};
shinezyy commented 5 months ago

能否提供完整的log?我刚注意到,你似乎只提供了stdout和stderr 2个log中的一个。

qqli579 commented 5 months ago

stdout 是空的,stderr 就是上面那个。

qqli579 commented 5 months ago

NEMU是用cpt-bk分支还是master分支?有的文档说用cpt-bk分支。有的文档说是用master分支

shinezyy commented 5 months ago

NEMU是用cpt-bk分支还是master分支?有的文档说用cpt-bk分支。有的文档说是用master分支

用master,麻烦提供一下说用cpt-bk分支的文档链接,谢谢!

shinezyy commented 5 months ago

stdout 是空的,stderr 就是上面那个。

stdout是空的这是不合理的……

qqli579 commented 5 months ago

run.sh 如下:

#!/bin/sh
echo '===== Start running SPEC2006 ====='
echo '======== BEGIN gobmk_13x13 ========'
set -x
md5sum /spec/gobmk_base.riscv64-gcc10
date -R
cd /spec && ./gobmk_base.riscv64-gcc10 --quiet --mode gtp < 13x13.tst
date -R
set +x
echo '======== END   gobmk_13x13 ========'
echo '===== Finish running SPEC2006 ====='

那before_wrokload程序怎么让它在运行run.sh之前执行?

shinezyy commented 5 months ago

run.sh 如下:

#!/bin/sh
echo '===== Start running SPEC2006 ====='
echo '======== BEGIN gobmk_13x13 ========'
set -x
md5sum /spec/gobmk_base.riscv64-gcc10
date -R
cd /spec && ./gobmk_base.riscv64-gcc10 --quiet --mode gtp < 13x13.tst
date -R
set +x
echo '======== END   gobmk_13x13 ========'
echo '===== Finish running SPEC2006 ====='

那before_wrokload程序怎么让它在运行run.sh之前执行?

你执行它就能让他执行了……

不知道我是否表达了我的意思?

shinezyy commented 5 months ago

麻烦提供一下说用cpt-bk分支的文档链接,谢谢!

qqli579 commented 5 months ago

https://xiangshan-doc.readthedocs.io/zh-cn/dev/tools/simpoint/ 现在用master分支也不行

shinezyy commented 5 months ago

https://xiangshan-doc.readthedocs.io/zh-cn/dev/tools/simpoint/ 现在用master分支也不行

你的run.sh没有执行before workload,当然不行……不管用哪个分支都不行……

shinezyy commented 5 months ago

https://xiangshan-doc.readthedocs.io/zh-cn/dev/tools/simpoint/ 现在用master分支也不行

然后,我比较好奇你是如何找到文档的dev这个分支的?我自己都没有进入过这个页面……我们更新的文档都在latest:

https://xiangshan-doc.readthedocs.io/zh-cn/latest/tools/simpoint/

qqli579 commented 5 months ago

完整run.sh 是这样

#!/bin/sh

cd /spec_common && ./before_workload

echo '===== Start running SPEC2006 ====='
echo '======== BEGIN gobmk_13x13 ========'
set -x
md5sum /spec/gobmk_base.riscv64-gcc10
date -R
cd /spec && ./gobmk_base.riscv64-gcc10 --quiet --mode gtp < 13x13.tst
date -R
set +x
echo '======== END   gobmk_13x13 ========'
echo '===== Finish running SPEC2006 ====='

cd /spec_common && ./trap

cd /spec_common && ./trap 需不需要执行?

shinezyy commented 5 months ago

完整run.sh 是这样

#!/bin/sh

cd /spec_common && ./before_workload

echo '===== Start running SPEC2006 ====='
echo '======== BEGIN gobmk_13x13 ========'
set -x
md5sum /spec/gobmk_base.riscv64-gcc10
date -R
cd /spec && ./gobmk_base.riscv64-gcc10 --quiet --mode gtp < 13x13.tst
date -R
set +x
echo '======== END   gobmk_13x13 ========'
echo '===== Finish running SPEC2006 ====='

cd /spec_common && ./trap

cd /spec_common && ./trap 需不需要执行?

需要

YudeFang commented 4 months ago

我测试了一下specCPU2006 里的gobmk_13x13,想生成checkpoint。看log,程序跑完了,但是生成的simpoint_bbv.gz文件是空的。指令如下:

/xiangshang/NEMU-master/NEMU/build/riscv64-nemu-interpreter /xiangshang/linux/riscv-pk/build/bbl.bin -D /xiangshang/NEMU-master/spec2006CheckPoint/CPU2006Simpoint -w 445.gobmk -C cpu2006-simpoint-profiling -b --simpoint-profile --cpt-interval 20000000 -r /xiangshang/NEMU-master/NEMU/resource/gcpt_restore/build/gcpt.bin

log 如下:

bbl loader

freq-mhz = 500
CLINT: set frequency to 500 MHz
              vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

                  vvvvvvvvvvvvvvvvvvvvvvvvvvvv

rrrrrrrrrrrrr       vvvvvvvvvvvvvvvvvvvvvvvvvv

rrrrrrrrrrrrrrrr      vvvvvvvvvvvvvvvvvvvvvvvv

rrrrrrrrrrrrrrrrrr    vvvvvvvvvvvvvvvvvvvvvvvv

rrrrrrrrrrrrrrrrrr    vvvvvvvvvvvvvvvvvvvvvvvv

rrrrrrrrrrrrrrrrrr    vvvvvvvvvvvvvvvvvvvvvvvv

rrrrrrrrrrrrrrrr      vvvvvvvvvvvvvvvvvvvvvv  

rrrrrrrrrrrrr       vvvvvvvvvvvvvvvvvvvvvv    

rr                vvvvvvvvvvvvvvvvvvvvvv      

rr            vvvvvvvvvvvvvvvvvvvvvvvv      rr

rrrr      vvvvvvvvvvvvvvvvvvvvvvvvvv      rrrr

rrrrrr      vvvvvvvvvvvvvvvvvvvvvv      rrrrrr

rrrrrrrr      vvvvvvvvvvvvvvvvvv      rrrrrrrr

rrrrrrrrrr      vvvvvvvvvvvvvv      rrrrrrrrrr

rrrrrrrrrrrr      vvvvvvvvvv      rrrrrrrrrrrr

rrrrrrrrrrrrrr      vvvvvv      rrrrrrrrrrrrrr

rrrrrrrrrrrrrrrr      vv      rrrrrrrrrrrrrrrr

rrrrrrrrrrrrrrrrrr          rrrrrrrrrrrrrrrrrr

rrrrrrrrrrrrrrrrrrrr      rrrrrrrrrrrrrrrrrrrr

rrrrrrrrrrrrrrrrrrrrrr  rrrrrrrrrrrrrrrrrrrrrr

       INSTRUCTION SETS WANT TO BE FREE

[    0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000

[    0.000000] Linux version 4.18.0 (hukun@n168-020-004) (gcc version 12.2.0 (g2ee5e430018)) #6 Fri Mar 1 11:43:52 CST 2024

[    0.000000] bootconsole [early0] enabled

[    0.000000] Initial ramdisk at: 0x(____ptrval____) (13131776 bytes)

[    0.000000] Zone ranges:

[    0.000000]   DMA32    empty

[    0.000000]   Normal   [mem 0x0000000080200000-0x00000000ffffffff]

[    0.000000] Movable zone start for each node

[    0.000000] Early memory node ranges

[    0.000000]   node   0: [mem 0x0000000080200000-0x00000000ffffffff]

[    0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x00000000ffffffff]

[    0.000000] software IO TLB [mem 0xfa3ff000-0xfe3ff000] (64MB) mapped at [(____ptrval____)-(____ptrval____)]

[    0.000000] elf_hwcap is 0x112d

[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 516615

[    0.000000] Kernel command line: root=/dev/mmcblk0 rootfstype=ext4 ro rootwait earlycon

[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)

[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)

[    0.000000] Sorting __ex_table...

[    0.000000] Memory: 1983476K/2095104K available (712K kernel code, 78K rwdata, 102K rodata, 12892K init, 98K bss, 111628K reserved, 0K cma-reserved)

[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1

[    0.000000] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0

[    0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 3526361616960 ns

[    0.000000] console [hvc0] enabled

[    0.000000] console [hvc0] enabled

[    0.000000] bootconsole [early0] disabled

[    0.000000] bootconsole [early0] disabled

[    0.000000] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.00 BogoMIPS (lpj=10000)

[    0.000000] pid_max: default: 4096 minimum: 301

[    0.000000] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)

[    0.000000] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)

[    0.010000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns

[    0.010000] futex hash table entries: 16 (order: -4, 384 bytes)

[    0.020000] clocksource: Switched to clocksource riscv_clocksource

[    1.620000] Unpacking initramfs...

[    3.190000] workingset: timestamp_bits=62 max_order=19 bucket_order=0

[    3.200000] random: get_random_bytes called from 0xffffffff80c9ac66 with crng_init=0

[    3.300000] Freeing unused kernel memory: 12892K

[    3.300000] This architecture does not have kernel memory protection.

===== Start running SPEC2006 =====

======== BEGIN gobmk_13x13 ========

+ md5sum /spec/gobmk_base.riscv64-gcc10

7f60c96700e8008bc6cc89bf2f8e6940  /spec/gobmk_base.riscv64-gcc10

+ date -R

Thu, 01 Jan 1970 00:00:07 +0000

+ cd /spec

+ ./gobmk_base.riscv64-gcc10 --quiet --mode gtp

= white

=1 J2

= white

=2 E10

= white

=3 E5

= white

=4 M4

= white

=5 N9

= white

=6 M8

= white

=7 M1

= white

=8 H8

= white

=9 B6

= white

=10 E3

= white

=11 G6

= white

=12 G7

= white

=13 G7

= white

=14 E8

= white

=15 C7

= white

=16 C6

= white

=17 L5

= white

=18 0

= white

=19 C10

= white

=20 M8

= white

=21 N8

= white

=22 C9

= white

=23 E12

= white

=24 H6

= white

=25 J5

= white

=26 J5

= white

=27 E3

= white

=28 E3

= white

=29 C8

= white

=30 B7

= white

=31 M4

= white

=33 E7

= white

=34 K13

= white

=35 B13

= white

=36 B2

= white

=37 E10

= white

=38 G10

= white

=39 H4

= white

=40 L11

= white

=41 H10

= white

=42 C7

= black

=43 D6

= black

=44 B6

= black

=45 B4

= black

=46 L3

= black

=47 K9

= black

=48 K7

= black

=49 K7

= black

=149 H12

= black

=50 H12

= black

=51 N9

= black

=52 H10

= black

=53 C6

= black

=54 H11

= black

=55 H6

= black

=56 H4

= black

=57 N7

= black

=58 0

= black

=59 K5

= black

=60 G3

= black

=61 K8

= black

=62 C12

= black

=63 K4

= black

=64 M3

= black

=65 L2

= black

=66 M5

= black

=67 B9

= black

=68 A8

= black

=69 D5

= black

=70 L10

= black

=71 J11

= black

=72 J10

= black

=73 H4

= black

=74 G7

= black

=75 E6

= black

=76 J3

= black

=77 C8

= black

=78 L4

= black

=79 M5

= black

=80 M2

= black

=81 M8

= black

=82 K4

= black

=83 L12

= black

=84 H13

= black

=85 D2

= black

=86 1 H5

= black

=87 F6

= black

=88 D6

= black

=89 0

= black

=90 A5

= black

=91 F5

+ date -R

Thu, 01 Jan 1970 03:38:13 +0000

+ set +x

======== END   gobmk_13x13 ========

===== Finish running SPEC2006 =====

但是运行指令的窗口还没有结束,一直停住在下面

/xiangshang/NEMU-master/NEMU/build/riscv64-nemu-interpreter /xiangshang/linux/riscv-pk/build/bbl.bin -D /xiangshang/NEMU-master/spec2006CheckPoint/CPU2006Simpoint -w 445.gobmk -C cpu2006-simpoint-profiling -b --simpoint-profile --cpt-interval 20000000 -r /xiangshang/NEMU-master/NEMU/resource/gcpt_restore/build/gcpt.bin

NEMU 用的是master分支。请问simpoint_bbv.gz文件是空的是什么原因

hi,我也遇到了这个问题,请问您的initramfs-spec.txt是如何配置的呢,我按照教程配置遇到了无法找到动态链接库libm.so.6 的问题 我的配置如下 dir /bin 755 0 0 dir /etc 755 0 0 dir /dev 755 0 0 dir /lib 755 0 0 dir /proc 755 0 0 dir /sbin 755 0 0 dir /sys 755 0 0 dir /tmp 755 0 0 dir /usr 755 0 0 dir /mnt 755 0 0 dir /usr/bin 755 0 0 dir /usr/lib 755 0 0 dir /usr/sbin 755 0 0 dir /var 755 0 0 dir /var/tmp 755 0 0 dir /root 755 0 0 dir /var/log 755 0 0

nod /dev/console 644 0 0 c 5 1 nod /dev/null 644 0 0 c 1 3

libraries

file /lib/libm.so.6 ${RISCV}/sysroot/lib64/lp64d/libm.so.6 755 0 0 file /lib/ld-linux-riscv64-lp64d.so.1 ${RISCV}/sysroot/lib/ld-linux-riscv64-lp64d.so.1 755 0 0 file /lib/libc.so.6 ${RISCV}/sysroot/lib64/lp64d/libc.so.6 755 0 0 file /lib/libresolv.so.2 ${RISCV}/sysroot/lib64/lp64d/libresolv.so.2 755 0 0 file /lib/libdl.so.2 ${RISCV}/sysroot/lib64/lp64d/libdl.so.2 755 0 0 file /lib/libpthread.so.0 ${RISCV}/sysroot/lib64/lp64d/libpthread.so.0 755 0 0

busybox

file /bin/busybox ${RISCV_ROOTFS_HOME}/rootfsimg/build/busybox 755 0 0 file /etc/inittab ${RISCV_ROOTFS_HOME}/rootfsimg/inittab-spec 755 0 0 slink /init /bin/busybox 755 0 0

SPEC common

dir /spec_common 755 0 0 file /spec_common/before_workload ${RISCV_ROOTFS_HOME}/rootfsimg/build/before_workload 755 0 0 file /spec_common/trap ${RISCV_ROOTFS_HOME}/rootfsimg/build/trap 755 0 0

SPEC

dir /spec 755 0 0 file /spec/run.sh ${RISCV_ROOTFS_HOME}/rootfsimg/run.sh 755 0 0 file /spec/astar_base /home/ray/other-disks/diskd/data-fyd/spec2006/spec2006/benchspec/CPU2006/473.astar/run/build_base_riscv.0000/astar 755 0 0 file /spec/BigLakes2048.bin /home/ray/other-disks/diskd/data-fyd/spec2006/spec2006/benchspec/CPU2006/473.astar/data/ref/input/BigLakes2048.bin 755 0 0 file /spec/BigLakes2048.cfg /home/ray/other-disks/diskd/data-fyd/spec2006/spec2006/benchspec/CPU2006/473.astar/data/ref/input/BigLakes2048.cfg 755 0 0

请问您有遇到过这个问题么 感谢

qqli579 commented 4 months ago

我测试了一下specCPU2006 里的gobmk_13x13,想生成checkpoint。看log,程序跑完了,但是生成的simpoint_bbv.gz文件是空的。指令如下:

/xiangshang/NEMU-master/NEMU/build/riscv64-nemu-interpreter /xiangshang/linux/riscv-pk/build/bbl.bin -D /xiangshang/NEMU-master/spec2006CheckPoint/CPU2006Simpoint -w 445.gobmk -C cpu2006-simpoint-profiling -b --simpoint-profile --cpt-interval 20000000 -r /xiangshang/NEMU-master/NEMU/resource/gcpt_restore/build/gcpt.bin

log 如下:

bbl loader

freq-mhz = 500
CLINT: set frequency to 500 MHz
              vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

                  vvvvvvvvvvvvvvvvvvvvvvvvvvvv

rrrrrrrrrrrrr       vvvvvvvvvvvvvvvvvvvvvvvvvv

rrrrrrrrrrrrrrrr      vvvvvvvvvvvvvvvvvvvvvvvv

rrrrrrrrrrrrrrrrrr    vvvvvvvvvvvvvvvvvvvvvvvv

rrrrrrrrrrrrrrrrrr    vvvvvvvvvvvvvvvvvvvvvvvv

rrrrrrrrrrrrrrrrrr    vvvvvvvvvvvvvvvvvvvvvvvv

rrrrrrrrrrrrrrrr      vvvvvvvvvvvvvvvvvvvvvv  

rrrrrrrrrrrrr       vvvvvvvvvvvvvvvvvvvvvv    

rr                vvvvvvvvvvvvvvvvvvvvvv      

rr            vvvvvvvvvvvvvvvvvvvvvvvv      rr

rrrr      vvvvvvvvvvvvvvvvvvvvvvvvvv      rrrr

rrrrrr      vvvvvvvvvvvvvvvvvvvvvv      rrrrrr

rrrrrrrr      vvvvvvvvvvvvvvvvvv      rrrrrrrr

rrrrrrrrrr      vvvvvvvvvvvvvv      rrrrrrrrrr

rrrrrrrrrrrr      vvvvvvvvvv      rrrrrrrrrrrr

rrrrrrrrrrrrrr      vvvvvv      rrrrrrrrrrrrrr

rrrrrrrrrrrrrrrr      vv      rrrrrrrrrrrrrrrr

rrrrrrrrrrrrrrrrrr          rrrrrrrrrrrrrrrrrr

rrrrrrrrrrrrrrrrrrrr      rrrrrrrrrrrrrrrrrrrr

rrrrrrrrrrrrrrrrrrrrrr  rrrrrrrrrrrrrrrrrrrrrr

       INSTRUCTION SETS WANT TO BE FREE

[    0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000

[    0.000000] Linux version 4.18.0 (hukun@n168-020-004) (gcc version 12.2.0 (g2ee5e430018)) #6 Fri Mar 1 11:43:52 CST 2024

[    0.000000] bootconsole [early0] enabled

[    0.000000] Initial ramdisk at: 0x(____ptrval____) (13131776 bytes)

[    0.000000] Zone ranges:

[    0.000000]   DMA32    empty

[    0.000000]   Normal   [mem 0x0000000080200000-0x00000000ffffffff]

[    0.000000] Movable zone start for each node

[    0.000000] Early memory node ranges

[    0.000000]   node   0: [mem 0x0000000080200000-0x00000000ffffffff]

[    0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x00000000ffffffff]

[    0.000000] software IO TLB [mem 0xfa3ff000-0xfe3ff000] (64MB) mapped at [(____ptrval____)-(____ptrval____)]

[    0.000000] elf_hwcap is 0x112d

[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 516615

[    0.000000] Kernel command line: root=/dev/mmcblk0 rootfstype=ext4 ro rootwait earlycon

[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)

[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)

[    0.000000] Sorting __ex_table...

[    0.000000] Memory: 1983476K/2095104K available (712K kernel code, 78K rwdata, 102K rodata, 12892K init, 98K bss, 111628K reserved, 0K cma-reserved)

[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1

[    0.000000] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0

[    0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 3526361616960 ns

[    0.000000] console [hvc0] enabled

[    0.000000] console [hvc0] enabled

[    0.000000] bootconsole [early0] disabled

[    0.000000] bootconsole [early0] disabled

[    0.000000] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.00 BogoMIPS (lpj=10000)

[    0.000000] pid_max: default: 4096 minimum: 301

[    0.000000] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)

[    0.000000] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)

[    0.010000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns

[    0.010000] futex hash table entries: 16 (order: -4, 384 bytes)

[    0.020000] clocksource: Switched to clocksource riscv_clocksource

[    1.620000] Unpacking initramfs...

[    3.190000] workingset: timestamp_bits=62 max_order=19 bucket_order=0

[    3.200000] random: get_random_bytes called from 0xffffffff80c9ac66 with crng_init=0

[    3.300000] Freeing unused kernel memory: 12892K

[    3.300000] This architecture does not have kernel memory protection.

===== Start running SPEC2006 =====

======== BEGIN gobmk_13x13 ========

+ md5sum /spec/gobmk_base.riscv64-gcc10

7f60c96700e8008bc6cc89bf2f8e6940  /spec/gobmk_base.riscv64-gcc10

+ date -R

Thu, 01 Jan 1970 00:00:07 +0000

+ cd /spec

+ ./gobmk_base.riscv64-gcc10 --quiet --mode gtp

= white

=1 J2

= white

=2 E10

= white

=3 E5

= white

=4 M4

= white

=5 N9

= white

=6 M8

= white

=7 M1

= white

=8 H8

= white

=9 B6

= white

=10 E3

= white

=11 G6

= white

=12 G7

= white

=13 G7

= white

=14 E8

= white

=15 C7

= white

=16 C6

= white

=17 L5

= white

=18 0

= white

=19 C10

= white

=20 M8

= white

=21 N8

= white

=22 C9

= white

=23 E12

= white

=24 H6

= white

=25 J5

= white

=26 J5

= white

=27 E3

= white

=28 E3

= white

=29 C8

= white

=30 B7

= white

=31 M4

= white

=33 E7

= white

=34 K13

= white

=35 B13

= white

=36 B2

= white

=37 E10

= white

=38 G10

= white

=39 H4

= white

=40 L11

= white

=41 H10

= white

=42 C7

= black

=43 D6

= black

=44 B6

= black

=45 B4

= black

=46 L3

= black

=47 K9

= black

=48 K7

= black

=49 K7

= black

=149 H12

= black

=50 H12

= black

=51 N9

= black

=52 H10

= black

=53 C6

= black

=54 H11

= black

=55 H6

= black

=56 H4

= black

=57 N7

= black

=58 0

= black

=59 K5

= black

=60 G3

= black

=61 K8

= black

=62 C12

= black

=63 K4

= black

=64 M3

= black

=65 L2

= black

=66 M5

= black

=67 B9

= black

=68 A8

= black

=69 D5

= black

=70 L10

= black

=71 J11

= black

=72 J10

= black

=73 H4

= black

=74 G7

= black

=75 E6

= black

=76 J3

= black

=77 C8

= black

=78 L4

= black

=79 M5

= black

=80 M2

= black

=81 M8

= black

=82 K4

= black

=83 L12

= black

=84 H13

= black

=85 D2

= black

=86 1 H5

= black

=87 F6

= black

=88 D6

= black

=89 0

= black

=90 A5

= black

=91 F5

+ date -R

Thu, 01 Jan 1970 03:38:13 +0000

+ set +x

======== END   gobmk_13x13 ========

===== Finish running SPEC2006 =====

但是运行指令的窗口还没有结束,一直停住在下面

/xiangshang/NEMU-master/NEMU/build/riscv64-nemu-interpreter /xiangshang/linux/riscv-pk/build/bbl.bin -D /xiangshang/NEMU-master/spec2006CheckPoint/CPU2006Simpoint -w 445.gobmk -C cpu2006-simpoint-profiling -b --simpoint-profile --cpt-interval 20000000 -r /xiangshang/NEMU-master/NEMU/resource/gcpt_restore/build/gcpt.bin

NEMU 用的是master分支。请问simpoint_bbv.gz文件是空的是什么原因

hi,我也遇到了这个问题,请问您的initramfs-spec.txt是如何配置的呢,我按照教程配置遇到了无法找到动态链接库libm.so.6 的问题 我的配置如下 dir /bin 755 0 0 dir /etc 755 0 0 dir /dev 755 0 0 dir /lib 755 0 0 dir /proc 755 0 0 dir /sbin 755 0 0 dir /sys 755 0 0 dir /tmp 755 0 0 dir /usr 755 0 0 dir /mnt 755 0 0 dir /usr/bin 755 0 0 dir /usr/lib 755 0 0 dir /usr/sbin 755 0 0 dir /var 755 0 0 dir /var/tmp 755 0 0 dir /root 755 0 0 dir /var/log 755 0 0

nod /dev/console 644 0 0 c 5 1 nod /dev/null 644 0 0 c 1 3

libraries

file /lib/libm.so.6 ${RISCV}/sysroot/lib64/lp64d/libm.so.6 755 0 0 file /lib/ld-linux-riscv64-lp64d.so.1 ${RISCV}/sysroot/lib/ld-linux-riscv64-lp64d.so.1 755 0 0 file /lib/libc.so.6 ${RISCV}/sysroot/lib64/lp64d/libc.so.6 755 0 0 file /lib/libresolv.so.2 ${RISCV}/sysroot/lib64/lp64d/libresolv.so.2 755 0 0 file /lib/libdl.so.2 ${RISCV}/sysroot/lib64/lp64d/libdl.so.2 755 0 0 file /lib/libpthread.so.0 ${RISCV}/sysroot/lib64/lp64d/libpthread.so.0 755 0 0

busybox

file /bin/busybox ${RISCV_ROOTFS_HOME}/rootfsimg/build/busybox 755 0 0 file /etc/inittab ${RISCV_ROOTFS_HOME}/rootfsimg/inittab-spec 755 0 0 slink /init /bin/busybox 755 0 0

SPEC common

dir /spec_common 755 0 0 file /spec_common/before_workload ${RISCV_ROOTFS_HOME}/rootfsimg/build/before_workload 755 0 0 file /spec_common/trap ${RISCV_ROOTFS_HOME}/rootfsimg/build/trap 755 0 0

SPEC

dir /spec 755 0 0 file /spec/run.sh ${RISCV_ROOTFS_HOME}/rootfsimg/run.sh 755 0 0 file /spec/astar_base /home/ray/other-disks/diskd/data-fyd/spec2006/spec2006/benchspec/CPU2006/473.astar/run/build_base_riscv.0000/astar 755 0 0 file /spec/BigLakes2048.bin /home/ray/other-disks/diskd/data-fyd/spec2006/spec2006/benchspec/CPU2006/473.astar/data/ref/input/BigLakes2048.bin 755 0 0 file /spec/BigLakes2048.cfg /home/ray/other-disks/diskd/data-fyd/spec2006/spec2006/benchspec/CPU2006/473.astar/data/ref/input/BigLakes2048.cfg 755 0 0

请问您有遇到过这个问题么 感谢

spec_gen.py生成initramfs-spec.txt的时候要把--checkpoints 打开,这样生成的run.sh 才会把before_wordload和trap加上,才会进入采集simpoint模式:

#!/bin/sh
echo '===== Start running SPEC2017 ====='
echo '======== BEGIN gcc_fipa ========'
set -x
md5sum /spec/sgcc_s_base.riscv-64
date -R
/spec_common/before_workload
cd /spec && ./sgcc_s_base.riscv-64 gcc-pp.c -O5 -fipa-pta -o gcc-pp.opts-O5_-fipa-pta.s
/spec_common/trap
date -R
set +x
echo '======== END   gcc_fipa ========'
echo '===== Finish running SPEC2017 ====='

找不到libm.so.6,你看看你的 ${RISCV}/sysroot/lib64/lp64d/这个路径下是不是没有

YudeFang commented 4 months ago

我测试了一下specCPU2006 里的gobmk_13x13,想生成checkpoint。看log,程序跑完了,但是生成的simpoint_bbv.gz文件是空的。指令如下:

/xiangshang/NEMU-master/NEMU/build/riscv64-nemu-interpreter /xiangshang/linux/riscv-pk/build/bbl.bin -D /xiangshang/NEMU-master/spec2006CheckPoint/CPU2006Simpoint -w 445.gobmk -C cpu2006-simpoint-profiling -b --simpoint-profile --cpt-interval 20000000 -r /xiangshang/NEMU-master/NEMU/resource/gcpt_restore/build/gcpt.bin

log 如下:

bbl loader

freq-mhz = 500
CLINT: set frequency to 500 MHz
              vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

                  vvvvvvvvvvvvvvvvvvvvvvvvvvvv

rrrrrrrrrrrrr       vvvvvvvvvvvvvvvvvvvvvvvvvv

rrrrrrrrrrrrrrrr      vvvvvvvvvvvvvvvvvvvvvvvv

rrrrrrrrrrrrrrrrrr    vvvvvvvvvvvvvvvvvvvvvvvv

rrrrrrrrrrrrrrrrrr    vvvvvvvvvvvvvvvvvvvvvvvv

rrrrrrrrrrrrrrrrrr    vvvvvvvvvvvvvvvvvvvvvvvv

rrrrrrrrrrrrrrrr      vvvvvvvvvvvvvvvvvvvvvv  

rrrrrrrrrrrrr       vvvvvvvvvvvvvvvvvvvvvv    

rr                vvvvvvvvvvvvvvvvvvvvvv      

rr            vvvvvvvvvvvvvvvvvvvvvvvv      rr

rrrr      vvvvvvvvvvvvvvvvvvvvvvvvvv      rrrr

rrrrrr      vvvvvvvvvvvvvvvvvvvvvv      rrrrrr

rrrrrrrr      vvvvvvvvvvvvvvvvvv      rrrrrrrr

rrrrrrrrrr      vvvvvvvvvvvvvv      rrrrrrrrrr

rrrrrrrrrrrr      vvvvvvvvvv      rrrrrrrrrrrr

rrrrrrrrrrrrrr      vvvvvv      rrrrrrrrrrrrrr

rrrrrrrrrrrrrrrr      vv      rrrrrrrrrrrrrrrr

rrrrrrrrrrrrrrrrrr          rrrrrrrrrrrrrrrrrr

rrrrrrrrrrrrrrrrrrrr      rrrrrrrrrrrrrrrrrrrr

rrrrrrrrrrrrrrrrrrrrrr  rrrrrrrrrrrrrrrrrrrrrr

       INSTRUCTION SETS WANT TO BE FREE

[    0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000

[    0.000000] Linux version 4.18.0 (hukun@n168-020-004) (gcc version 12.2.0 (g2ee5e430018)) #6 Fri Mar 1 11:43:52 CST 2024

[    0.000000] bootconsole [early0] enabled

[    0.000000] Initial ramdisk at: 0x(____ptrval____) (13131776 bytes)

[    0.000000] Zone ranges:

[    0.000000]   DMA32    empty

[    0.000000]   Normal   [mem 0x0000000080200000-0x00000000ffffffff]

[    0.000000] Movable zone start for each node

[    0.000000] Early memory node ranges

[    0.000000]   node   0: [mem 0x0000000080200000-0x00000000ffffffff]

[    0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x00000000ffffffff]

[    0.000000] software IO TLB [mem 0xfa3ff000-0xfe3ff000] (64MB) mapped at [(____ptrval____)-(____ptrval____)]

[    0.000000] elf_hwcap is 0x112d

[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 516615

[    0.000000] Kernel command line: root=/dev/mmcblk0 rootfstype=ext4 ro rootwait earlycon

[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)

[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)

[    0.000000] Sorting __ex_table...

[    0.000000] Memory: 1983476K/2095104K available (712K kernel code, 78K rwdata, 102K rodata, 12892K init, 98K bss, 111628K reserved, 0K cma-reserved)

[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1

[    0.000000] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0

[    0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 3526361616960 ns

[    0.000000] console [hvc0] enabled

[    0.000000] console [hvc0] enabled

[    0.000000] bootconsole [early0] disabled

[    0.000000] bootconsole [early0] disabled

[    0.000000] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.00 BogoMIPS (lpj=10000)

[    0.000000] pid_max: default: 4096 minimum: 301

[    0.000000] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)

[    0.000000] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)

[    0.010000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns

[    0.010000] futex hash table entries: 16 (order: -4, 384 bytes)

[    0.020000] clocksource: Switched to clocksource riscv_clocksource

[    1.620000] Unpacking initramfs...

[    3.190000] workingset: timestamp_bits=62 max_order=19 bucket_order=0

[    3.200000] random: get_random_bytes called from 0xffffffff80c9ac66 with crng_init=0

[    3.300000] Freeing unused kernel memory: 12892K

[    3.300000] This architecture does not have kernel memory protection.

===== Start running SPEC2006 =====

======== BEGIN gobmk_13x13 ========

+ md5sum /spec/gobmk_base.riscv64-gcc10

7f60c96700e8008bc6cc89bf2f8e6940  /spec/gobmk_base.riscv64-gcc10

+ date -R

Thu, 01 Jan 1970 00:00:07 +0000

+ cd /spec

+ ./gobmk_base.riscv64-gcc10 --quiet --mode gtp

= white

=1 J2

= white

=2 E10

= white

=3 E5

= white

=4 M4

= white

=5 N9

= white

=6 M8

= white

=7 M1

= white

=8 H8

= white

=9 B6

= white

=10 E3

= white

=11 G6

= white

=12 G7

= white

=13 G7

= white

=14 E8

= white

=15 C7

= white

=16 C6

= white

=17 L5

= white

=18 0

= white

=19 C10

= white

=20 M8

= white

=21 N8

= white

=22 C9

= white

=23 E12

= white

=24 H6

= white

=25 J5

= white

=26 J5

= white

=27 E3

= white

=28 E3

= white

=29 C8

= white

=30 B7

= white

=31 M4

= white

=33 E7

= white

=34 K13

= white

=35 B13

= white

=36 B2

= white

=37 E10

= white

=38 G10

= white

=39 H4

= white

=40 L11

= white

=41 H10

= white

=42 C7

= black

=43 D6

= black

=44 B6

= black

=45 B4

= black

=46 L3

= black

=47 K9

= black

=48 K7

= black

=49 K7

= black

=149 H12

= black

=50 H12

= black

=51 N9

= black

=52 H10

= black

=53 C6

= black

=54 H11

= black

=55 H6

= black

=56 H4

= black

=57 N7

= black

=58 0

= black

=59 K5

= black

=60 G3

= black

=61 K8

= black

=62 C12

= black

=63 K4

= black

=64 M3

= black

=65 L2

= black

=66 M5

= black

=67 B9

= black

=68 A8

= black

=69 D5

= black

=70 L10

= black

=71 J11

= black

=72 J10

= black

=73 H4

= black

=74 G7

= black

=75 E6

= black

=76 J3

= black

=77 C8

= black

=78 L4

= black

=79 M5

= black

=80 M2

= black

=81 M8

= black

=82 K4

= black

=83 L12

= black

=84 H13

= black

=85 D2

= black

=86 1 H5

= black

=87 F6

= black

=88 D6

= black

=89 0

= black

=90 A5

= black

=91 F5

+ date -R

Thu, 01 Jan 1970 03:38:13 +0000

+ set +x

======== END   gobmk_13x13 ========

===== Finish running SPEC2006 =====

但是运行指令的窗口还没有结束,一直停住在下面

/xiangshang/NEMU-master/NEMU/build/riscv64-nemu-interpreter /xiangshang/linux/riscv-pk/build/bbl.bin -D /xiangshang/NEMU-master/spec2006CheckPoint/CPU2006Simpoint -w 445.gobmk -C cpu2006-simpoint-profiling -b --simpoint-profile --cpt-interval 20000000 -r /xiangshang/NEMU-master/NEMU/resource/gcpt_restore/build/gcpt.bin

NEMU 用的是master分支。请问simpoint_bbv.gz文件是空的是什么原因

hi,我也遇到了这个问题,请问您的initramfs-spec.txt是如何配置的呢,我按照教程配置遇到了无法找到动态链接库libm.so.6 的问题 我的配置如下 dir /bin 755 0 0 dir /etc 755 0 0 dir /dev 755 0 0 dir /lib 755 0 0 dir /proc 755 0 0 dir /sbin 755 0 0 dir /sys 755 0 0 dir /tmp 755 0 0 dir /usr 755 0 0 dir /mnt 755 0 0 dir /usr/bin 755 0 0 dir /usr/lib 755 0 0 dir /usr/sbin 755 0 0 dir /var 755 0 0 dir /var/tmp 755 0 0 dir /root 755 0 0 dir /var/log 755 0 0 nod /dev/console 644 0 0 c 5 1 nod /dev/null 644 0 0 c 1 3

libraries

file /lib/libm.so.6 ${RISCV}/sysroot/lib64/lp64d/libm.so.6 755 0 0 file /lib/ld-linux-riscv64-lp64d.so.1 ${RISCV}/sysroot/lib/ld-linux-riscv64-lp64d.so.1 755 0 0 file /lib/libc.so.6 ${RISCV}/sysroot/lib64/lp64d/libc.so.6 755 0 0 file /lib/libresolv.so.2 ${RISCV}/sysroot/lib64/lp64d/libresolv.so.2 755 0 0 file /lib/libdl.so.2 ${RISCV}/sysroot/lib64/lp64d/libdl.so.2 755 0 0 file /lib/libpthread.so.0 ${RISCV}/sysroot/lib64/lp64d/libpthread.so.0 755 0 0

busybox

file /bin/busybox ${RISCV_ROOTFS_HOME}/rootfsimg/build/busybox 755 0 0 file /etc/inittab ${RISCV_ROOTFS_HOME}/rootfsimg/inittab-spec 755 0 0 slink /init /bin/busybox 755 0 0

SPEC common

dir /spec_common 755 0 0 file /spec_common/before_workload ${RISCV_ROOTFS_HOME}/rootfsimg/build/before_workload 755 0 0 file /spec_common/trap ${RISCV_ROOTFS_HOME}/rootfsimg/build/trap 755 0 0

SPEC

dir /spec 755 0 0 file /spec/run.sh ${RISCV_ROOTFS_HOME}/rootfsimg/run.sh 755 0 0 file /spec/astar_base /home/ray/other-disks/diskd/data-fyd/spec2006/spec2006/benchspec/CPU2006/473.astar/run/build_base_riscv.0000/astar 755 0 0 file /spec/BigLakes2048.bin /home/ray/other-disks/diskd/data-fyd/spec2006/spec2006/benchspec/CPU2006/473.astar/data/ref/input/BigLakes2048.bin 755 0 0 file /spec/BigLakes2048.cfg /home/ray/other-disks/diskd/data-fyd/spec2006/spec2006/benchspec/CPU2006/473.astar/data/ref/input/BigLakes2048.cfg 755 0 0 请问您有遇到过这个问题么 感谢

spec_gen.py生成initramfs-spec.txt的时候要把--checkpoints 打开,这样生成的run.sh 才会把before_wordload和trap加上,才会进入采集simpoint模式:

#!/bin/sh
echo '===== Start running SPEC2017 ====='
echo '======== BEGIN gcc_fipa ========'
set -x
md5sum /spec/sgcc_s_base.riscv-64
date -R
/spec_common/before_workload
cd /spec && ./sgcc_s_base.riscv-64 gcc-pp.c -O5 -fipa-pta -o gcc-pp.opts-O5_-fipa-pta.s
/spec_common/trap
date -R
set +x
echo '======== END   gcc_fipa ========'
echo '===== Finish running SPEC2017 ====='

找不到libm.so.6,你看看你的 ${RISCV}/sysroot/lib64/lp64d/这个路径下是不是没有

我确定这个路径下是有的,但是bbl打包的时候就是找不到,checkpoints我是打开的

YudeFang commented 4 months ago

可以贴一下您的initramfs-spec.txt文件么?

qqli579 commented 4 months ago

gcc的initramfs-spec.txt

dir /bin 755 0 0
dir /etc 755 0 0
dir /dev 755 0 0
dir /lib 755 0 0
dir /proc 755 0 0
dir /sbin 755 0 0
dir /sys 755 0 0
dir /tmp 755 0 0
dir /usr 755 0 0
dir /mnt 755 0 0
dir /usr/bin 755 0 0
dir /usr/lib 755 0 0
dir /usr/sbin 755 0 0
dir /var 755 0 0
dir /var/tmp 755 0 0
dir /root 755 0 0
dir /var/log 755 0 0

nod /dev/console 644 0 0 c 5 1
nod /dev/null 644 0 0 c 1 3

# libraries
file /lib/ld-linux-riscv64-lp64d.so.1 ${RISCV}/sysroot/lib/ld-linux-riscv64-lp64d.so.1 755 0 0
file /lib/libc.so.6 ${RISCV}/sysroot/lib/libc.so.6 755 0 0
file /lib/libresolv.so.2 ${RISCV}/sysroot/lib/libresolv.so.2 755 0 0
file /lib/libm.so.6 ${RISCV}/sysroot/lib/libm.so.6 755 0 0
file /lib/libdl.so.2 ${RISCV}/sysroot/lib/libdl.so.2 755 0 0
file /lib/libpthread.so.0 ${RISCV}/sysroot/lib/libpthread.so.0 755 0 0

# busybox
file /bin/busybox ${RISCV_ROOTFS_HOME}/rootfsimg/build/busybox 755 0 0
file /etc/inittab ${RISCV_ROOTFS_HOME}/rootfsimg/inittab-spec 755 0 0
slink /init /bin/busybox 755 0 0

# SPEC common
dir /spec_common 755 0 0
file /spec_common/before_workload /xiangshang/linux/riscv-rootfs/rootfsimg/build/before_workload 755 0 0
file /spec_common/trap /xiangshang/linux/riscv-rootfs/rootfsimg/build/trap 755 0 0

# SPEC
dir /spec 755 0 0
file /spec/run.sh ${RISCV_ROOTFS_HOME}/rootfsimg/run.sh 755 0 0
file /spec/sgcc_s_base.riscv-64 ${SPEC}/602.gcc_s/exe/sgcc_s_base.riscv-64 755 0 0
file /spec/gcc-pp.c ${SPEC}/602.gcc_s/run/run_base_refspeed_mytest-m64.0001/gcc-pp.c 755 0 0
YudeFang commented 4 months ago

gcc的initramfs-spec.txt

dir /bin 755 0 0
dir /etc 755 0 0
dir /dev 755 0 0
dir /lib 755 0 0
dir /proc 755 0 0
dir /sbin 755 0 0
dir /sys 755 0 0
dir /tmp 755 0 0
dir /usr 755 0 0
dir /mnt 755 0 0
dir /usr/bin 755 0 0
dir /usr/lib 755 0 0
dir /usr/sbin 755 0 0
dir /var 755 0 0
dir /var/tmp 755 0 0
dir /root 755 0 0
dir /var/log 755 0 0

nod /dev/console 644 0 0 c 5 1
nod /dev/null 644 0 0 c 1 3

# libraries
file /lib/ld-linux-riscv64-lp64d.so.1 ${RISCV}/sysroot/lib/ld-linux-riscv64-lp64d.so.1 755 0 0
file /lib/libc.so.6 ${RISCV}/sysroot/lib/libc.so.6 755 0 0
file /lib/libresolv.so.2 ${RISCV}/sysroot/lib/libresolv.so.2 755 0 0
file /lib/libm.so.6 ${RISCV}/sysroot/lib/libm.so.6 755 0 0
file /lib/libdl.so.2 ${RISCV}/sysroot/lib/libdl.so.2 755 0 0
file /lib/libpthread.so.0 ${RISCV}/sysroot/lib/libpthread.so.0 755 0 0

# busybox
file /bin/busybox ${RISCV_ROOTFS_HOME}/rootfsimg/build/busybox 755 0 0
file /etc/inittab ${RISCV_ROOTFS_HOME}/rootfsimg/inittab-spec 755 0 0
slink /init /bin/busybox 755 0 0

# SPEC common
dir /spec_common 755 0 0
file /spec_common/before_workload /xiangshang/linux/riscv-rootfs/rootfsimg/build/before_workload 755 0 0
file /spec_common/trap /xiangshang/linux/riscv-rootfs/rootfsimg/build/trap 755 0 0

# SPEC
dir /spec 755 0 0
file /spec/run.sh ${RISCV_ROOTFS_HOME}/rootfsimg/run.sh 755 0 0
file /spec/sgcc_s_base.riscv-64 ${SPEC}/602.gcc_s/exe/sgcc_s_base.riscv-64 755 0 0
file /spec/gcc-pp.c ${SPEC}/602.gcc_s/run/run_base_refspeed_mytest-m64.0001/gcc-pp.c 755 0 0

看起来我的文件基本和您一样 可以的话您可以试一下把您的libm.so.6文件发在github里么?我确实找不到可能的错误 路径我改成绝对路径依然找不到