mirror of
https://gitee.com/openharmony/developtools_profiler
synced 2024-11-23 06:50:12 +00:00
!752 Hiebpf中gen_skeleton.sh使用相对路径,out目录层级变化时会编译报错
Merge pull request !752 from zhangjian22/master
This commit is contained in:
commit
a994e57db2
@ -84,9 +84,13 @@ action("gen_bpf_skeleton") {
|
||||
script = "./scripts/gen_skeleton.sh"
|
||||
sources = []
|
||||
outputs = [ "$skel_out_dir/hiebpf.skel.h" ]
|
||||
bpftool_dir = rebase_path("//prebuilts/develop_tools/bpftool/bin/bpftool")
|
||||
skel_src_dir_abs = rebase_path("${skel_src_dir}")
|
||||
skel_out_dir_abs = rebase_path("${skel_out_dir}")
|
||||
args = [
|
||||
skel_src_dir,
|
||||
skel_out_dir,
|
||||
bpftool_dir,
|
||||
skel_src_dir_abs,
|
||||
skel_out_dir_abs,
|
||||
]
|
||||
deps = [ ":hiebpf.bpf" ]
|
||||
}
|
||||
|
@ -13,12 +13,13 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License
|
||||
|
||||
CWD=$(pwd)
|
||||
BASE_DIR=${CWD}"/../.."${1#\/}
|
||||
DEST_DIR=${CWD}"/../.."${2#\/}
|
||||
BPFTOOL_DIR=${1}
|
||||
BASE_DIR=${2}
|
||||
DEST_DIR=${3}
|
||||
|
||||
echo ${BASE_DIR}
|
||||
echo ${DEST_DIR}
|
||||
echo "BPFTOOL_DIR:"${BPFTOOL_DIR}
|
||||
echo "BASE_DIR:"${BASE_DIR}
|
||||
echo "DEST_DIR:"${DEST_DIR}
|
||||
|
||||
if [[ ! -d "${BASE_DIR}" ]]
|
||||
then
|
||||
@ -51,7 +52,7 @@ do
|
||||
echo "current skeleton name: "${SKEL_NAME}
|
||||
SKEL_PATH=${DEST_DIR}"/"${SKEL_NAME}
|
||||
echo "current skeleton path: "${SKEL_PATH}
|
||||
../../prebuilts/develop_tools/bpftool/bin/bpftool gen skeleton ${OBJ_PATH} > ${SKEL_PATH}
|
||||
${BPFTOOL_DIR} gen skeleton ${OBJ_PATH} > ${SKEL_PATH}
|
||||
if [ ! -s "${SKEL_PATH}" ]
|
||||
then
|
||||
echo ${SKEL_PATH}" is empty"
|
||||
|
Loading…
Reference in New Issue
Block a user