Commit Graph

5 Commits

Author SHA1 Message Date
chenrun1
875f2fcc1e ramspeed:Fix memleak due to double malloc.
if (allocate_rw_address)
    {
      info->dest = malloc(info->size);
      info->src = malloc(info->size);
    }
  if ((info->dest == NULL && !info->allocate_rw_address) || info->size == 0)
    {
      printf(RAMSPEED_PREFIX "Missing required arguments\n");
      goto out;
    }
  else
    {
      /* We need to automatically apply for memory */
      printf(RAMSPEED_PREFIX "Allocate RW buffers on heap\n");
      info->dest = malloc(info->size);
      if (info->dest == NULL)
        {
          printf(RAMSPEED_PREFIX "Dest Alloc Memory Failed!\n");
          goto out;
        }
      info->src = malloc(info->size);
      if (info->src == NULL)
        {
          printf(RAMSPEED_PREFIX "Src Alloc Memory Failed!\n");
          goto out;
        }
    }

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-08 09:51:55 +08:00
chenrun1
e04782816f ramspeed:Add log printing & improve test accuracy & optional test cases
1.Add more print logs

ramspeed -w 0x61ba15c0 -s 524288 -n 10000 -i
RAM Speed: Write address: 0x0x61ba15c0
RAM Speed: Read address: 0x0
RAM Speed: Size: 524288 bytes
RAM Speed: Value: 0x00
RAM Speed: Repeat number: 10000
RAM Speed: Interrupts disabled: true

2.Improve test accuracy, now print in double type in us time unit

______Perform 32 Bytes access______
RAM Speed: system memset():      Rate = 625000.000 KB/s [cost: 0.500 ms]
RAM Speed: internal memset():    Rate = 240384.615 KB/s [cost: 1.300 ms]

3. Optional test item, if we do not pass in the src address, only memset will be executed

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-08 09:51:55 +08:00
chenrun1
3b6f6ab4e6 ramspeed:Fix the mem leak caused by not releasing memory when the task exits under the -a option
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-08 09:51:55 +08:00
Stuart Ianna
8b8094ea35 benchmarks/ramspeed: Don't expose interrupt control with kernel
configuration.

enter_critical_section and leave_critical_section aren't reliable
interfaces to expose in usermode, as they aren't available if
CONFIG_IRQCOUNT is enabled.
2024-05-21 09:05:57 +08:00
chenrun1
e6c3930b2d apps:Move the performance tools to benchmark.
1.ramspeed
2.cachespeed
3.osperf
4.iozone
5.superPI

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-04-08 14:11:31 +08:00