builtin-inject.c (79b40a1b182bcca381bb59d0219e1dd681a64981) builtin-inject.c (7031edac9dbc0f880c9fbaa40ca08b5de34239c6)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * builtin-inject.c
4 *
5 * Builtin inject command: Examine the live mode (stdin) event stream
6 * and repipe it to stdout while optionally injecting additional
7 * events into it.
8 */

--- 616 unchanged lines hidden (view full) ---

625 if (dso->has_build_id)
626 return 0;
627
628 mutex_lock(&dso->lock);
629 nsinfo__mountns_enter(dso->nsinfo, &nsc);
630 if (filename__read_build_id(dso->long_name, &dso->bid) > 0)
631 dso->has_build_id = true;
632 else if (dso->nsinfo) {
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * builtin-inject.c
4 *
5 * Builtin inject command: Examine the live mode (stdin) event stream
6 * and repipe it to stdout while optionally injecting additional
7 * events into it.
8 */

--- 616 unchanged lines hidden (view full) ---

625 if (dso->has_build_id)
626 return 0;
627
628 mutex_lock(&dso->lock);
629 nsinfo__mountns_enter(dso->nsinfo, &nsc);
630 if (filename__read_build_id(dso->long_name, &dso->bid) > 0)
631 dso->has_build_id = true;
632 else if (dso->nsinfo) {
633 char *new_name;
633 char *new_name = dso__filename_with_chroot(dso, dso->long_name);
634
634
635 new_name = filename_with_chroot(dso->nsinfo->pid,
636 dso->long_name);
637 if (new_name && filename__read_build_id(new_name, &dso->bid) > 0)
638 dso->has_build_id = true;
639 free(new_name);
640 }
641 nsinfo__mountns_exit(&nsc);
642 mutex_unlock(&dso->lock);
643
644 return dso->has_build_id ? 0 : -1;

--- 1751 unchanged lines hidden ---
635 if (new_name && filename__read_build_id(new_name, &dso->bid) > 0)
636 dso->has_build_id = true;
637 free(new_name);
638 }
639 nsinfo__mountns_exit(&nsc);
640 mutex_unlock(&dso->lock);
641
642 return dso->has_build_id ? 0 : -1;

--- 1751 unchanged lines hidden ---