Skip to content

Instantly share code, notes, and snippets.

all:
gcc -g -O0 *.c -o record_sample
msg: STRUCTURE: /home/proy/datacentric/working_copy/structslim/clomp_v1.2/clomp
msg: Line map : /home/proy/datacentric/working_copy/structslim/hpctoolkit/install/lib/hpctoolkit/libhpcrun.so.0.0.0
msg: Line map : /home/proy/datacentric/working_copy/structslim/hpctoolkit/install/lib/hpctoolkit/ext-libs/libmonitor.so.0.0.0
msg: Line map : /home/proy/datacentric/working_copy/structslim/hpctoolkit/install/lib/hpctoolkit/libhpcrun_datacentric.so.0.0.0
msg: Line map : /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0
msg: Line map : /lib/x86_64-linux-gnu/libc-2.27.so
msg: Line map : /lib/x86_64-linux-gnu/libpthread-2.27.so
msg: Line map : /lib/x86_64-linux-gnu/ld-2.27.so
name :STRUCTSLIM_GCD_OF_Relative_Distance.[0,0] (I)
name :STRUCTSLIM_GCD_OF_Relative_Distance.[0,0] (E)
void
calculateSizeOfStructure(Prof::CallPath::Profile& prof)
{
if(leafGCDId.empty())
listAllGCDMetrics(prof);
//traverse the CCT here
auto *prof_root = prof.cct()->root();
Prof::CCT::ANodeIterator prof_it(prof_root, NULL/*filter*/, false/*leavesOnly*/, IteratorStack::PreOrder);
for (Prof::CCT::ANode *n = NULL; (n = prof_it.current()); ++prof_it) {
Prof::CCT::ADynNode* n_dyn = dynamic_cast<Prof::CCT::ADynNode*>(n);
<capabilities>
<host>
<uuid>4c4c4544-005a-3710-8048-b7c04f4a5632</uuid>
<cpu>
<arch>x86_64</arch>
<model>Broadwell-noTSX-IBRS</model>
<vendor>Intel</vendor>
<microcode version='150'/>
<topology sockets='1' cores='6' threads='1'/>
struct perf_event_attr attr;
hw_breakpoint_init(&attr);
attr.bp_addr = addr;
attr.bp_len = HW_BREAKPOINT_LEN_1;
attr.bp_type = HW_BREAKPOINT_W | HW_BREAKPOINT_R;
attr.sample_period = DBG_FREQUENCY;
attr.exclude_kernel = 0;
attr.exclude_user = 1;
attr.disabled = 0;
$ sudo ./lkvm run -k /home/probir/kvmtool/guest_linux_kernel/linux-4.13/arch/x86_64/boot/bzImage -m 448 -c 4 --network mode=user --disk /home/probir/kvmtool/ubuntu_disk/ubuntuD.img -i /home/probir/kvmtool/guest_linux_kernel/linux-4.13/initrd-4.13.0-41-generic.img -p "root=/dev/vda1"
[sudo] password for probir:
# lkvm run -k /home/probir/kvmtool/guest_linux_kernel/linux-4.13/arch/x86_64/boot/bzImage -m 448 -c 4 --name guest-1296
[ 0.000000] random: get_random_bytes called from start_kernel+0x42/0x4f2 with crng_init=0
[ 0.000000] Linux version 4.13.0 (root@probir-XPS-13-9343) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9)) #6 SMP Wed May 16 15:31:29 EDT 2018
[ 0.000000] Command line: noapic noacpi pci=conf1 reboot=k panic=1 i8042.direct=1 i8042.dumbkbd=1 i8042.nopnp=1 earlyprintk=serial i8042.noaux=1 console=ttyS0 root=/dev/vda1
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
$ sudo ./lkvm run -k /home/probir/kvmtool/guest_linux_kernel/linux-4.13/arch/x86_64/boot/bzImage -m 448 -c 4 --network virtio --disk /home/probir/kvmtool/ubuntu_disk/ubuntu.img -i /home/probir/kvmtool/guest_linux_kernel/linux-4.13/initrd-4.13.0-41-generic.img -p "root=/dev/vda1"
[sudo] password for probir:
# lkvm run -k /home/probir/kvmtool/guest_linux_kernel/linux-4.13/arch/x86_64/boot/bzImage -m 448 -c 4 --name guest-11989
[ 0.000000] random: get_random_bytes called from start_kernel+0x42/0x4f2 with crng_init=0
[ 0.000000] Linux version 4.13.0 (root@probir-XPS-13-9343) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9)) #6 SMP Wed May 16 15:31:29 EDT 2018
[ 0.000000] Command line: noapic noacpi pci=conf1 reboot=k panic=1 i8042.direct=1 i8042.dumbkbd=1 i8042.nopnp=1 earlyprintk=serial i8042.noaux=1 console=ttyS0 root=/dev/vda1
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
$ sudo ./lkvm run --disk /home/probir/Downloads/ubuntu-core-16-amd64.img --kernel /home/probir/kvmtool/guest_linux_kernel/linux-4.13/arch/x86_64/boot/bzImage --network virtio -c 2 -m 6000 -i /home/probir/kvmtool/guest_linux_kernel/linux-4.13/initrd-4.13.0-41-generic.img --name ubuntu
# lkvm run -k /home/probir/kvmtool/guest_linux_kernel/linux-4.13/arch/x86_64/boot/bzImage -m 6000 -c 2 --name ubuntu
[ 0.000000] random: get_random_bytes called from start_kernel+0x42/0x4ff with crng_init=0
[ 0.000000] Linux version 4.13.0 (root@probir-XPS-13-9343) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9)) #5 SMP Tue May 15 13:19:30 EDT 2018
[ 0.000000] Command line: noapic noacpi pci=conf1 reboot=k panic=1 i8042.direct=1 i8042.dumbkbd=1 i8042.nopnp=1 earlyprintk=serial i8042.noaux=1 console=ttyS0 root=/dev/vda rw
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.15.0-rc4 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"